Practice Test Geeks home

SQL - Structured Query Language Advanced Window Functions Questions and Answers

A financial analyst needs to calculate the month-over-month sales growth.
The table `MonthlySales` has columns `Product`, `SaleMonth`, and `TotalSales`.

Which window function is best suited to retrieve the previous month's sales amount on the same row as the current month's sales to facilitate the calculation?

Select your answer