Challenge: Summarize Transaction Status
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 4. Kapitel 6
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Fantastiskt!
Completion betyg förbättrat till 2.86
Challenge: Summarize Transaction Status
Svep för att visa menyn
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 4. Kapitel 6
single