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

bookChallenge: Summarize Transaction Status

Tarea

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.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 6
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

bookChallenge: Summarize Transaction Status

Desliza para mostrar el menú

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 6
single

single

some-alt