Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Summarize Transaction Status | Logical Functions
Functions in SQL

bookChallenge: 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 status is 'completed' and return this as completed_count.
  • Count the number of transactions where status is 'pending' and return this as pending_count.
  • Count the number of transactions where status is 'failed' and return this as failed_count.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 4. Kapitel 6
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookChallenge: 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 status is 'completed' and return this as completed_count.
  • Count the number of transactions where status is 'pending' and return this as pending_count.
  • Count the number of transactions where status is 'failed' and return this as failed_count.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 4. Kapitel 6
single

single

some-alt