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:
You can in this way that the first row is sorted in descending based on average find
select top 1 worker_id, avg(salary) as avgsalary from workers group by worker_id order by avgsalary desc