HARMAN's Business Analytics team wants a quarterly view of qualifying North American sales across JBL, Harman Kardon, and related product lines. Write a PostgreSQL query that joins orders, order items, and products to identify products meeting the specified sales criteria.
Requirements
- Include only orders from North America with status
Completed between 2025-01-01 and 2025-03-31.
- Include only products in the
Audio category.
- Calculate total units, distinct order count, and net revenue after discounts, treating a missing discount as 0%.
- Keep products with net revenue of at least 250, label each result using
CASE, and sort by net revenue descending.