Skip to main content
All Problems
medium0% acceptance

Revenue Impact of Discounts

Compare gross revenue vs net revenue across all order items. Calculate the total gross revenue (quantity * unit_price), total net revenue (quantity * unit_price * (1 - discount)), and the total discount amount (gross - net). Return a single row with all three values rounded to 2 decimal places.

Schema

🔑idINT
🔗order_idINT
🔗product_idINT
quantityINT
unit_priceREAL
discountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute