为什么Oracle认为它缺少正确的括号?
SELECT table2.name
FROM (SELECT id, count (*) AS num
FROM table1 GROUP BY id WHERE x = 1)
table1, table2, table3
WHERE table2.temp_id = table3.temp_id AND
table1.num > = s.num AND
table2.id = table3.id;
答案 0 :(得分:7)
在您的内联视图中,您的WHERE
子句位于GROUP BY
之后。你需要扭转那个
SELECT id, count (*) AS num
FROM table1 WHERE x = 1 GROUP BY id)