Oracle Database SQL Certified Associate Exam [sql]

Access More Questions
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?
Correct Answer:
LAG(TotalSales) OVER (PARTITION BY Product ORDER BY SaleMonth)

Access more questions from this quiz

Continue to Oracle Database SQL Certified Associate Exam [sql] for more practice questions and the full quiz experience.

Access More Questions