我收到此错误消息“未在预期位置找到 FROM 关键字”。我究竟做错了什么?
SELECT department_id
FROM employees
HAVING MIN(salary) < (SELECT MIN(salary)
WHERE department_id < 60)
GROUP BY department_id;
谢谢你的帮助!
我收到此错误消息“未在预期位置找到 FROM 关键字”。我究竟做错了什么?
SELECT department_id
FROM employees
HAVING MIN(salary) < (SELECT MIN(salary)
WHERE department_id < 60)
GROUP BY department_id;
谢谢你的帮助!
您在该行中缺少一个 from:
SELECT MIN(salary)
WHERE department_id < 60
它需要是
SELECT MIN(salary) FROM {TABLENAMEHERE}
WHERE department_id < 60
对于完整的查询:
SELECT department_id
FROM employees
GROUP BY department_id
HAVING MIN(salary) < (SELECT MIN(salary) FROM {TABLENAMEHERE}
WHERE department_id < 60);