select * from (select * from emp order by sal desc)where rownum<=3這樣也是可以的
2018-08-22
select p.ci_id,max(stu_name) as STU_NAME
from (select c.ci_id,wm_concat(s.stu_name)
over(partition BY c.stu_ids order by s.stu_id) as stu_name
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id) > 0) p
group by p.ci_id
查詢出來后有排序效果的
from (select c.ci_id,wm_concat(s.stu_name)
over(partition BY c.stu_ids order by s.stu_id) as stu_name
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id) > 0) p
group by p.ci_id
查詢出來后有排序效果的
2018-08-17
最新回答 / 嗚嗚嗚嗚喵王
select p.ci_id,max(stu_name) as STU_NAMEfrom (select c.ci_id,wm_concat(s.stu_name)?over(partition BY c.stu_ids order by s.stu_id) as stu_namefrom pm_ci c,pm_stu swhere instr(c.stu_ids,s.stu_id) > 0) p?group by p.ci_id查詢出來后有排序效果的..
2018-07-15
拿走,不謝,已測試通過
select t3.ci_id as CI_ID,
wm_concat(t3.stu_name) as STU_NAME
from
(
select t1.ci_id,t2.stu_name
from pm_ci t1 cross join pm_stu t2
where instr(t1.stu_ids,t2.stu_id)>0
) t3
group by t3.ci_id;
select t3.ci_id as CI_ID,
wm_concat(t3.stu_name) as STU_NAME
from
(
select t1.ci_id,t2.stu_name
from pm_ci t1 cross join pm_stu t2
where instr(t1.stu_ids,t2.stu_id)>0
) t3
group by t3.ci_id;
2018-07-08
最新回答 / 慕斯卡6169147
主要是因?yàn)閷?shí)際應(yīng)用中會(huì)有很多的表。如事實(shí)表,維度表。分析數(shù)據(jù)是會(huì)涉及到從眾多表中取值,因此會(huì)出現(xiàn)很復(fù)雜的SQL。小點(diǎn)的需求幾百行起步,大點(diǎn)的需求上萬行都是正常的。
2018-07-07
已采納回答 / 閉眼呼吸丶陽光
第一行不要出現(xiàn)空行title col 15 ‘我的報(bào)表’ col 35 sql.pnocol deptno heading 部門號(hào)col sum(sal) heading 工資總額break on depton skip 1
2018-07-01