Skip to main content
All Problems
easy0% acceptance

Combine Cancelled and Returned Orders

The loss prevention team needs a combined list of problematic orders. Write a query that returns all cancelled orders and all returned orders as a single result set. Include the order id, customer_id, order_date, status, and total_amount. Use UNION ALL to preserve duplicates.

Schema

🔑idINT
🔗customer_idINT
order_dateTEXT
statusTEXT
total_amountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute