1
我不明白我得到的錯誤!ORA-00979:不是GROUP BY表達式錯誤
我的問題是,我必須顯示僱員的姓名和他們工作的會議數量。如果員工沒有直接在任何會議上工作,則必須爲該員工顯示0。與此查詢相關的表是:
Employee_C表:
EID NAME SALARY MID
--- -------------------- -----
e01 Wilson 53000
e02 Smith 48000 e01
e03 Jones 38000 e01
e04 Loftus 41000
e05 Fox 54000 e04
e06 Smith 45000 e04
e07 Green 48000
e08 Fox 49000 e04
e09 Wolf 41000 e04
e10 Wang 32000 e01
e11 Phillips 33000 e07
e12 Liu 27000 e07
Deals_C表:
EID CONFID
--- ------
e02 c00001
e03 c00001
e05 c00001
e06 c00001
e03 c00002
e08 c00002
e09 c00002
e10 c00002
e03 c00003
e05 c00003
e06 c00004
e08 c00005
e09 c00005
e10 c00005
e06 c00005
e11 c00006
e12 c00006
e05 c00007
e06 c00007
e08 c00007
e09 c00008
e10 c00008
e11 c00008
e02 c00009
e12 c00009
e10 c00010
e02 c00011
e03 c00011
e05 c00011
e12 c00012
e06 c00012
,我有SQL語句是
select E.Name, D.ConfID as "Number of Conferences"
from Employee_C E left outer join Deals_C D on E.eid = D.eid group by E.eid;
錯誤:
1號線選擇E.Name,D.ConfID作爲 * 錯誤 「的會議數」: ORA-00979:不是GROUP BY表達式
請幫幫忙! 謝謝
太感謝你了! – Navy 2013-03-26 18:39:15