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

Write a query to compare sales performance year-over-year by month. Return month_num, month_name, current_year_sales (2024), previous_year_sales (2023), and yoy_growth_percentage.

Relevant Tables

orders

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: