我有桌子人,我只想要结果Departement
。
我拥有2个以上的工程师级。
我正在尝试这样的查询
SELECT
Department, Level
FROM
people
WHERE
Level = 'Engineer'
HAVING
(Level = 'Engineer' > 2)
但没有结果,请帮助我
答案 0 :(得分:4)
您缺少GROUP BY
和COUNT(Level) > 2
。查询将是:
SELECT Department
FROM people
WHERE Level = 'Engineer'
GROUP BY Department
HAVING COUNT(Level) > 2