...
/Question: Using FIRST_VALUE(), LAST_VALUE(), and NTH_VALUE()
Question: Using FIRST_VALUE(), LAST_VALUE(), and NTH_VALUE()
Check your understanding of using FIRST_VALUE(), LAST_VALUE(), and NTH_VALUE() window functions in SQL.
We'll cover the following...
Question
Consider the following Sales
table structure:
SalesID | Month | SalesAmount |
1 | January | 1500 |
2 | February | 1400 |
3 | March | 1200 |
4 | April | 1600 |
5 | May | 800 |
6 | June | 6400 |
7 | July | 2400 |
8 | August | 2100 |
9 | September | 700 |
10 | October | 1000 |
11 | November | 5400 |
12 | December | 7400 |
As a sales analyst, you need to summarize key sales metrics for the year. Your goal is to write an SQL query that retrieves the sales data for each month. It should also highlight ...
Access this course and 1400+ top-rated courses and projects.