Skip to main content
All Problems
hard0% acceptance

Revenue Pivot by Payment Method

Create a pivot report showing total revenue per month broken down by payment method. Each payment method should be its own column. Use CASE expressions inside SUM to achieve the pivot. Assume methods include 'credit_card', 'debit_card', 'paypal', and 'bank_transfer'.

Schema

🔑idINT
🔗customer_idINT
order_dateTEXT
statusTEXT
total_amountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute