Query the row with the greatest/least value per group.
One of the most frequent stumpers for SQL programmers is to query rows that match the greatest (or least) value over a given group. For example, all details about the City with the largest population per state. You can't do it simply with GROUP BY because the other columns will be ambiguous.
A variation that appears occasionally is to query the top n rows from each group (see the limit-per-group).
Make sure to include the database tags as well (mysql, sqlite, postgresql etc.) because depending on the database, the optimal query might be different.