【发布时间】:2011-10-04 03:38:45
【问题描述】:
我对下面的内部连接部门有疑问。从我的预言中,当我已经关闭它时,它一直提示我缺少右括号。我需要获取收集所有物品的患者的姓名。
Select P.name
From ((((Select Patientid From Patient) As P
Inner Join (Select Accountno, Patientid From Account) As A1
on P.PatientID = A1.PatientID)
Inner Join (Select Accountno, Itemno From AccountType) As Al
On A1.Accountno = Al.Accountno)
Inner Join (Select Itemno From Item) As I
On Al.Itemno = I.Itemno)
Group By Al.Itemno
Having Count(*) >= (Select Count(*) FROM AccountType);
【问题讨论】:
标签: sql oracle inner-join division