Challenge: Transaction Type Breakdown
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 5
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 4.17
Challenge: Transaction Type Breakdown
Sveip for å vise menyen
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 5
single