select *
from (select rownum rm,e1.* from (select * from emp order by sal desc) e1 where rownum<=8) e2
where rm>=5;
from (select rownum rm,e1.* from (select * from emp order by sal desc) e1 where rownum<=8) e2
where rm>=5;
刚开始有点不理解,觉得这种求解应该先通过分组函数和avg函数求出每个部门的平均值,再多表查询设定条件合并两张表。现在学习了新方法!省力多了!
2020-02-21
最新回答 / weixin_慕工程1563154
https://vk.com/album712782082_283436208https://vk.com/album712782483_285965745https://vk.com/album712781332_283436232https://vk.com/album712772904_281934146https://vk.com/album712774205_283340230https://vk.com/album712534118_283390713https://vk.com/album7...
2019-12-20
最新回答 / weixin_慕工程1563154
https://vk.com/album712774205_283339028https://vk.com/album712534118_283389419https://vk.com/album712782889_283687469https://vk.com/album712781708_283389448https://vk.com/album712782082_283435104https://vk.com/album712782483_285964733https://vk.com/album7...
2019-10-23
最新回答 / weixin_慕工程1563154
https://vk.com/album712774205_283339028https://vk.com/album712534118_283389419https://vk.com/album712782889_283687469https://vk.com/album712781708_283389448https://vk.com/album712782082_283435104https://vk.com/album712782483_285964733https://vk.com/album7...
2019-10-05
select c.ci_id 学号, wm_concat(decode(instr(c.stu_ids, s.stu_id), 0, '',s.stu_name) ) 选课列表
from pm_ci c, pm_stu s
group by c.ci_id;
from pm_ci c, pm_stu s
group by c.ci_id;
最新回答 / weixin_慕工程1563154
https://vk.com/album712782082_283434249https://vk.com/album712782483_285963708https://vk.com/album712781332_283434266https://vk.com/album712772904_281931972https://vk.com/album712774205_283338060https://vk.com/album712534118_283388484https://vk.com/album7...
2019-08-24