Challenge: Transaction Type Breakdown
Opgave
Swipe to start coding
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'. - Show the results with one row per month, and columns for the month, purchase count, refund count, and fee count.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 5
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 4.17
Challenge: Transaction Type Breakdown
Stryg for at vise menuen
Opgave
Swipe to start coding
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'. - Show the results with one row per month, and columns for the month, purchase count, refund count, and fee count.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 5
single