Scenario SQL Question
Calculate Discount Based on Order Quantity
Build mastery in Case Statements with this scenario-based SQL challenge and live execution support.
Problem Statement
Apply a discount based on quantity: 5% if quantity ≥ 10, 10% if ≥ 20, 15% if ≥ 50. Compute discounted_price (price after discount). Return order_id, quantity, price, discounted_price — ordered by order_id.
Relevant Tables
orders
SQL Concepts Used in This Scenario
Strengthen your understanding with these targeted learning topics: