On 10/16/07, Jamie Tufnell <diesql(at)googlemail(dot)com> wrote:
> I'm taking a subset of all my genres, and I want to get ONE row for each
> movie in the subset alongside its most appropriate genre (whichever has the
> highest relevance). In other words, the best fit.
You didn't provide the expected output, but try:
SELECT *
FROM t tt
WHERE relevance = (SELECT MAX(relevance)
FROM t
WHERE movie_id = tt.movie_id)