亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Oracle高級查詢

select *
from (select rownum rm,e1.* from (select * from emp order by sal desc) e1 where rownum<=8) e2
where rm>=5;
剛開始有點不理解,覺得這種求解應該先通過分組函數和avg函數求出每個部門的平均值,再多表查詢設定條件合并兩張表?,F在學習了新方法!省力多了!
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
給老師點贊!給慕課網點贊。

最新回答 / 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...
聽了一點點,感覺還不錯,表達流暢,停頓有序,邏輯清晰

最新回答 / 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...

最新回答 / 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...
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;
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;
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;

結果:select b.cid,wm_concat(b.sname) from (1) b group by b.cid;
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

最新回答 / 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...
e1里沒必要寫rownum了,沒意義,如果沒想清楚很容易被誤導
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 當做新表
3* group by c.ci_id

最贊回答 / 羅海瓊
大于集合的最小值即可沒有說是大于集合的所有值
課程須知
小伙伴們,學習本課程前需要掌握Oracle的語法基礎,并且對Oracle的函數有所了解。如不了解這兩部分內容,請移步《Oracle數據庫開發必備利器之SQL基礎》和《Oracle數據庫開發利器之函數》兩門教程。
老師告訴你能學到什么?
1、掌握分組查詢 2、掌握多表查詢 3、掌握子查詢

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消