Australian Made and Owned

Returning the entire row of maximum value for each group (Group-wise Maximum in SQL / MySQL )

Posted July 8, 2010

NOTE: The content of this article is inaccurate and needs to be amended. If you wish to be notified when the update is made, you may subscribe via email.

Some SQLLast week I was joyfully hacking away at a project, progressing from from one task to another. Then it came time to do a non-trivial SQL query, though at the time I still thought the query would be nothing more than a select with a GROUP BY. I was wrong.

The Problem

What I wanted was to return the most recent log for each task for a particular user.

Here’s my table:
(more…)

Filed under: MySQL — Tags: , , , , , — Tim @ 12:01 pm