Emulating Analytic (AKA Ranking) Functions with MySQL
Oracle, DB2, and SQL Server all have analytic functions, ways to preserve the details in a record when you use an aggregate. MySQL lacks them, but you can emulate them if you want. Stephane Faroult shows some of the ways to go about this in the first of a two part series.