From multiple queries into one query in SQL
<p>My database "Films" contains columns: name, year (1980-2015) and rating of the film (1-10).
I would like to get the BEST FILM from EVERY year like:</p>

<pre><code>The Beutiful Mind 2001 rating: 8.2
Catch Me If You Can 2002 rating: 8.0
</code></pre>

<p>I only can think how to do it in multiple queries like:</p>

<pre><code>SELECT *
FROM movies
WHERE year = 2001
ORDER BY imdb_rating DESC
LIMIT 1;

SELECT *
FROM movies
WHERE year = 2002
ORDER BY imdb_rating DESC
LIMIT 1;
</code></pre>

<p>etc.</p>

<p>How can i achieve it in one query in SQL? What's the best way? Or maybe there is no problem with multiple queries in this case? Thanks for help :) </p>