Quantcast
Channel: Database Journal
Viewing all articles
Browse latest Browse all 151

Selecting the Top N Results by Group in MySQL

$
0
0

A common business requirement is to fetch the top N rows of each group, for example, largest cities for each country. Unfortunately many solutions utilize non-MySQL vendor-specific functions. Rob Gravelle covers a couple of approaches that will work with MySQL.


Viewing all articles
Browse latest Browse all 151

Trending Articles