About the “Net Realized Revenue & Promotional Discount Impact” SQL Problem
Business Scenario
Finance and growth marketing are evaluating coupon campaign ROI. They need a breakdown of sales grouped by discount promotion codes to verify which codes generate substantial net sales after deducting promotional price cuts.
Expected Output & Criteria
Summary of promo code sales metrics with net revenue >= $500, sorted by highest net revenue.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMThis challenge executes directly against the following relational schema in your browser:
CREATE TABLE checkout_orders (
order_id INT PRIMARY KEY,
promo_code VARCHAR(30) NOT NULL,
gross_amount NUMERIC(10, 2) NOT NULL,
discount_amount NUMERIC(10, 2) NOT NULL DEFAULT 0.00
);Target SQL Clauses & Operators
Want more Aggregations practice?
Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.