102年調三資料庫考古題 - 考試
By Irma
at 2015-06-22T17:14
at 2015-06-22T17:14
Table of Contents
大家好:
小弟想詢問調三資料庫第5題之(一)
此小題說要用兩層式巢狀來解
太久沒coding了
不知道這樣寫是否符合"兩層式"巢狀
我自己解法感覺像又不大像 = =
題目不好排版故用圖床,解答在題目下方
先謝謝各位高手了
題目:
http://i.imgur.com/p8xBzHE.jpg
解:
select name , age , department
from personal
where department
in(
select department
from personal
where salary > 40000
group by department
having count(employeeid)>=2
)
group by name , age ,department, salary
having salary > 45000
--
小弟想詢問調三資料庫第5題之(一)
此小題說要用兩層式巢狀來解
太久沒coding了
不知道這樣寫是否符合"兩層式"巢狀
我自己解法感覺像又不大像 = =
題目不好排版故用圖床,解答在題目下方
先謝謝各位高手了
題目:
http://i.imgur.com/p8xBzHE.jpg
解:
select name , age , department
from personal
where department
in(
select department
from personal
where salary > 40000
group by department
having count(employeeid)>=2
)
group by name , age ,department, salary
having salary > 45000
--
Tags:
考試
All Comments
By Ursula
at 2015-06-26T00:05
at 2015-06-26T00:05
By Eden
at 2015-06-29T17:58
at 2015-06-29T17:58
Related Posts
鐵路佐1200公尺跑步的問題
By Daniel
at 2015-06-22T16:06
at 2015-06-22T16:06
考前被分手,壓力好大
By Tom
at 2015-06-22T14:54
at 2015-06-22T14:54
中華電信104年護理人員遴選簡章(CHT正職)
By Cara
at 2015-06-22T14:42
at 2015-06-22T14:42
迴歸分析求MME時為何需要傳統假設
By Tom
at 2015-06-22T13:56
at 2015-06-22T13:56
計算機概論..拜託幫我解一下
By Susan
at 2015-06-22T13:42
at 2015-06-22T13:42