title: Movie with highest rating?
body: <p>Find the movie(s) with the highest average rating. Return the movie title(s) and average rating.</p>
  
  <p>I tried this and stuck because I'm not able to retrieve <code>mid</code> if i add <code>mid, max(avg_stars)</code> then it will give <code>max</code> of every <code>mid</code>, I want only one <code>max</code> value.</p>
  
  <p><a href="http://sqlfiddle.com/#!3/e3ee1/13" rel="nofollow">http://sqlfiddle.com/#!3/e3ee1/13</a></p>
  
  <pre><code>select max(avg_stars) from
  (
  select top 1 mid, avg(stars) as avg_stars
  from rating
  group by mid
  order by avg_stars desc
  ) z
  </code></pre>
  
  <p>excepted output <code>Snow White 4.5</code> and how can i handle if two movies having same max(avg_stars).</p>