Skip to main content
All Problems
easy0% acceptance

Count Orders by Status Category

Write a single query that returns the total number of orders, the count of completed orders (status = 'delivered'), and the count of problematic orders (status IN ('cancelled', 'returned')).

Schema

🔑idINT
🔗customer_idINT
order_dateTEXT
statusTEXT
total_amountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute