Introduction
Ranking functions
Selecting n-th row
Summary

Instruction

Let's get down to work. So far, you've learned how to use OVER() with familiar aggregate functions like SUM(), COUNT(), AVG(), MAX() and MIN().

Now we'll teach you different functions – ranking functions – that work with OVER(). The general syntax is as follows:

<RankingFunction> OVER (ORDER BY <Columns>)

As you know, OVER (ORDER BY Col1, Col2...) is the part where you specify the order in which rows should be sorted and therefore ranked. We'll introduce some ranking functions in the next exercises.

Exercise

Click Next exercise to continue.