January 1, 2021

#81 - MySQL using the RANK() function

The RANK() function was introduced on MySQL Server 8.0, and it enables the programmer to rank the data by different ways. 

On this example I wrote a nested query to select the 5 best sold items per country in a year quarter (Q4, 2003) using the DENSE_RANK() and joining 4 tables from this database:

No comments:

Post a Comment