here is the most accurate way to find the maximum average salary:
select max ( avg(salary)) from workers group by worker_id;
You can apply a group function to a group function retreiving a column of data values, ie max to avg(salary).