Sektion 1. Kapitel 24
single
Challenge: Summarize Transaction Status
Stryg for at vise menuen
Opgave
Swipe to start coding
Write a query to count the number of transactions for each status in the transactions table using the CASE statement.
- Count the number of transactions where
statusis'completed'and return this ascompleted_count. - Count the number of transactions where
statusis'pending'and return this aspending_count. - Count the number of transactions where
statusis'failed'and return this asfailed_count.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 24
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