I'm trying to add an extra column to my query. Based on the avarage salary, it should write BELOW or ABOVE into the column, but it doesn't work. What is the problem?
SELECT CONCAT(firstname, lastname) AS name
FROM workers
CASE
WHEN salary < avg(salary) THEN 'BELOW'
WHEN salary > avg(salary) THEN 'ABOVE'
ELSE 'AVARAGE'
END;