The Scenario
An online retailer has a `sales` table with columns: `order_id`, `product_category`, `sale_amount`, `sale_date`, and `region`. The marketing team wants three quick answers before their Monday meeting.
The Brief
Write three SQL queries against the sales table. You do not need a live database — write the SQL in code blocks and explain what each query returns.
Deliverables
- Query 1: Total revenue by product category, sorted highest to lowest
- Query 2: All regions where total revenue exceeds R500,000, using HAVING
- Query 3: The top 5 highest-revenue days in the last 90 days
Submission Guidance
Write standard SQL (PostgreSQL or MySQL syntax). Include column aliases for readability.
Submit Your Work
Your submission is graded against the rubric on the right. If you pass, you get a public Badge URL you can share on LinkedIn. There is no draft save, so work offline first and paste your finished response here.