select * from (select * from emp order by sal desc)where rownum<=3這樣也是可以的
2018-08-22
最新回答 / 嗚嗚嗚嗚喵王
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;
最新回答 / 慕斯卡6169147
主要是因為實際應用中會有很多的表。如事實表,維度表。分析數據是會涉及到從眾多表中取值,因此會出現很復雜的SQL。小點的需求幾百行起步,大點的需求上萬行都是正常的。
2018-07-07
已采納回答 / 閉眼呼吸丶陽光
第一行不要出現空行title col 15 ‘我的報表’ col 35 sql.pnocol deptno heading 部門號col sum(sal) heading 工資總額break on depton skip 1
2018-07-01