title: Nested aggregate functions, Max(Avg()), in SQL
body: <p>I'm writing this query in SQL :</p>
  
  <pre><code>select MAX(AVG(salary) ) from employees group by department_id;
  </code></pre>
  
  <p>First I will get groups by <code>department_id</code> , but next what will happen ?</p>