即使存在表格,也会出现此错误
select count(eventguest.memberid) + x as total, eventid
from (
select count(eventmember.memberid) as X, eventmember.eventid
from eventmember
group by eventid
)
inner join eventguest on eventmember.eventid = eventguest.eventid
group by eventid
ORA-00904:“ EVENTMEMBER”。“ EVENTID”:无效的标识符 00904. 00000-“%s:无效的标识符” *原因:
*行动: 行错误:16列:15
答案 0 :(得分:0)
以下查询应正常工作:
SELECT Count(eventguest.memberid) + x AS total,
Y.eventid
FROM
(
SELECT Count(eventmember.memberid) AS X,
eventmember.eventid
FROM eventmember
GROUP BY eventid
) Y
INNER JOIN eventguest
ON Y.eventid = eventguest.eventid
GROUP BY Y.eventid