I am trying to display the maximum average salary; however, I can\'t seem to get it to work.
I can get a list of the average salaries to display with:
https://stackoverflow.com/a/8050885/12190487 shows the folllowing error
ER_DERIVED_MUST_HAVE_ALIAS: Every derived table must have its own alias
Use alias for the new formed column you are selecting from
select max(avg_salary)
from (select worker_id, avg(salary) AS avg_salary
from workers
group by worker_id) as avg ;