My Oracle Support Banner

Select the Top N Rows Per Group (Doc ID 2692978.1)

Last updated on JULY 21, 2020

Applies to:

MySQL Server - Version 5.7 and later
Information in this document applies to any platform.

Goal

Get the top N rows per group

For example, using the world database, select the 3 most populated countries for each continent.
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.