SQL Data Analyst — Medium
Key points
- FIRST_VALUE(revenue) returns the value of the specified column from the first row in the partition.
- The OVER clause defines the partition and order for the function.
- The ORDER BY clause ensures the revenue is from the first row based on sale date.
Ready to go further?
Related questions
