SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Year-over-Year (YoY) Sales Comparison

Build mastery in Date Operations with this scenario-based SQL challenge and live execution support.

Problem Statement

Compare monthly revenue for 2024 versus 2023 side by side, with the YoY growth percentage. Return month_num, month_name, current_year_sales, previous_year_sales, yoy_growth_percentage — ordered by month_num.

Relevant Tables

orders

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: