Skip to main content
All Problems
easy0% acceptance

Order Items with Discounts Applied

Find all order items where a discount was applied (discount > 0). Return the order_id, product_id, quantity, unit_price, discount, and the net line total calculated as quantity * unit_price * (1 - discount). Sort by net line total descending.

Schema

🔑idINT
🔗order_idINT
🔗product_idINT
quantityINT
unit_priceREAL
discountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute