Kickstart 2020 with new opportunities! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Ranking functions
Selecting n-th row
Summary

Instruction

Let's get down to work. So far, you've learned how to use window functions with aggregate functions that you already know – SUM(), COUNT(), AVG(), MAX() and MIN().

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

<ranking function> OVER (ORDER BY <order by columns>)

We'll introduce a few possible ranking functions in the next exercises.

As to OVER (ORDER BY col1, col2...), this is the part where you specify the order in which rows should be sorted and therefore ranked.

Exercise

Press Next exercise to continue.