SELECT
department_id, ROUND(MIN(salary), 2) AS 'Min Salary'
FROM
employees
GROUP BY department_id
HAVING 'Min Salary' > 800;
This doesn't seem to work, but instead this:
SELECT
department_id, ROUND(MIN(salary), 2) AS min_salary
FROM
employees
GROUP BY department_id
HAVING min_salary > 800
works just fine. Can someone give an answer to why i cant make a HAVING clause with ' ' or " ", but instead i have to use the column name?