title: Can I do a max(count(*)) in SQL?
body: <p>Here's my code:</p>
  <pre><code>select yr,count(*)
  from movie
  join casting on casting.movieid=movie.id
  join actor on casting.actorid = actor.id
  where actor.name = 'John Travolta'
  group by yr;
  </code></pre>
  <p>Here's the question:</p>
  <blockquote>
  <p>Which were the busiest years for 'John Travolta'. Show the number of movies he made for each year.</p>
  </blockquote>
  <p>Here's the table structure:</p>
  <pre><code>movie(id, title, yr, score, votes, director)
  actor(id, name)
  casting(movieid, actorid, ord)
  </code></pre>
  <p>This is the output I am getting:</p>
  <pre><code>yr      count(*)
  1976    1
  1977    1
  1978    1
  1981    1
  1994    1
  -- etc.
  </code></pre>
  <p>I need to get the rows for which <code>count(*)</code> is max.
  How do I do this?</p>