« first day (94 days earlier)      last day (2564 days later) » 

20:07
Hello!
I'm having a problem with a MySQL query containing a LEFT JOIN and looking for some help. Basically I have two tables: one for championships, and one for title winners.
The title winners table contains a winner column, championship column (which is a foreign key) and a date_won column.
I want to pull out all championships, and the latest title winner for that championship (or NULL in the case of no title winners yet).
I thought I had got that with a query, but it contains a GROUP BY on the championship.id column and as a result, pulls out the first title winner, whereas I want the last title winner (to create a "roll call of title holders" section on a website).
Any one? :(
20:23
Ah!
Sounds like you're looking at a groupwise max problem.
20:41
Thanks, @TehShrike. I'll take a look now.

« first day (94 days earlier)      last day (2564 days later) »