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;
剛開始有點不理解,覺得這種求解應(yīng)該先通過分組函數(shù)和avg函數(shù)求出每個部門的平均值,再多表查詢設(shè)定條件合并兩張表?,F(xiàn)在學(xué)習(xí)了新方法!省力多了!
2020-02-21
select a.ci_id,wm_concat(b.stu_name)
from pm_ci a,pm_stu b
where instr(a.stu_ids,b.stu_id) > 0
group by a.ci_id
from pm_ci a,pm_stu b
where instr(a.stu_ids,b.stu_id) > 0
group by a.ci_id
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(s.stu_name) stu_name
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id)<>0
group by c.ci_id;
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id)<>0
group by c.ci_id;
2019-09-22
select c.ci_id 學(xué)號, 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;
2019-09-18
1:select c.ci_id cid,s.stu_name sname ,instr(c.stu_ids,s.stu_id)
from pm_ci c,pm_stus s
where instr(c.stu_ids,s.stu_id)<>0;
結(jié)果:select b.cid,wm_concat(b.sname) from (1) b group by b.cid;
from pm_ci c,pm_stus s
where instr(c.stu_ids,s.stu_id)<>0;
結(jié)果:select b.cid,wm_concat(b.sname) from (1) b group by b.cid;
2019-09-16
select a.ci_id,wm_concat(b.stu_name) stu_name from sett.pm_ci a,sett.pm_stu b
where instr(a.stu_ids,b.stu_id)>0
group by a.ci_id
where instr(a.stu_ids,b.stu_id)>0
group by a.ci_id
2019-08-25
最新回答 / 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
select c.ci_id,wm_concat(c.stu_name) stu_name from
2 (select c.ci_id,s.stu_name from pm_ci c ,pm_stu s where instr(c.stu_ids,s.stu_id)<>0) c 當(dāng)做新表
3* group by c.ci_id
2 (select c.ci_id,s.stu_name from pm_ci c ,pm_stu s where instr(c.stu_ids,s.stu_id)<>0) c 當(dāng)做新表
3* group by c.ci_id
2019-08-14