MySQL display top rated items?
<p>Given the following tables:</p>

<pre><code>---movie---
id int(11)
description varchar(200)

---movie_has_rating---
movie_id int(11)
user varchar(100)
stars int(11) &lt;-- A 1-5 star rating
</code></pre>

<p>How would I select the top 50 rated movies using the IMDb weighted average</p>

<pre><code>(WR) = (v ÷ (v+m)) × R + (m ÷ (v+m)) × C  where:

R = average for the movie (mean) = (Rating)

v = number of votes for the movie = (votes)

m = minimum votes required to be listed

C = the mean vote across the whole report
</code></pre>

<p>Assuming m is something like 5 or whatever?</p>