title: How to find maximum avg
body: <p>I am trying to display the maximum average salary; however, I can't seem to get it to work.</p>
  
  <p>I can get a list of the average salaries to display with:</p>
  
  <pre><code>select worker_id, avg(salary)
  from workers
  group by worker_id;
  </code></pre>
  
  <p>However, when I try to display a list of the maximum average salary with:</p>
  
  <pre><code>select max (avg(salary))
  from (select worker_id, avg(salary)
        from workers
        group by worker_id);
  </code></pre>
  
  <p>it doesn't run. I get an "invalid identifier" error. How do I use the average salary for each worker to find the maximum average for each worker?</p>
  
  <p>Thanks.</p>