title: Replacing HAVING with WHERE
body: <pre><code>SELECT team, sum(maths)
  FROM marks
  GROUP BY team
  HAVING sum(maths) = (
      SELECT max(sum(maths))
      FROM marks
      GROUP BY team
  )
  </code></pre>
  
  <p>There are three teams A,B,C with some no of members in it.</p>
  
  <p>First using <code>SELECT max(sum(maths)) FROM marks GROUP BY team</code> I am obtaining the max sum of maths.</p>
  
  <p>Now using the entire query I am trying to display the team who got the highest sum on maths. </p>
  
  <p>How can I rewrite the query so as to replace the <code>HAVING</code> with <code>WHERE</code>.</p>