Introduction
LEAD() and LAG()
4. General syntax
FIRST_VALUE(), LAST_VALUE()
Summary

Instruction

Okay! Let's introduce the general syntax for analytic functions:

<AnalyticFunction> OVER (...)

Looks familiar? That's right. Analytic functions are quite easy, and their syntax is identical to aggregate functions. The difference is that aggregate functions calculate a cumulative result for all the rows in the window frame, while analytic functions refer to single rows within the frame.

Exercise

Click Next exercise to continue.