Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- model_number,
- title,
- SUM(unit_cost_cents / 100.00 * quantity_ordered) as total
- FROM orders
- GROUP BY model_number
- HAVING SUM(quantity_submitted) > 0
- ORDER BY total DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement