Sectie 4. Hoofdstuk 5
single
Challenge: Transaction Type Breakdown
Veeg om het menu te tonen
Taak
Veeg om te beginnen met coderen
Write a query that, for each month, shows the count of transactions of type 'purchase', 'refund', and 'fee' as separate columns.
- For each month in the
transactionstable, count how many transactions havetransaction_typeequal to 'purchase'. - For each month, count how many transactions have
transaction_typeequal to 'refund'. - For each month, count how many transactions have
transaction_typeequal to 'fee'. - Use
TO_CHAR(transaction_date, 'YYYY-MM')to extract the month from the date, and name this columnmonth. Show one row per month, with columnspurchase_count,refund_count, andfee_count.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 4. Hoofdstuk 5
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.