Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Categorize Sales Volume | CASE WHEN Basics and Categorization
Practice
Projects
Quizzes & Challenges
Cuestionarios
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: Categorize Sales Volume

Tarea

Swipe to start coding

Write a query that selects all columns from the sales table and adds a new column named volume_category. The value of volume_category should be determined by the following rules:

  • If quantity is greater than or equal to 100, set volume_category to 'Bulk'.
  • If quantity is greater than or equal to 20 but less than 100, set volume_category to 'Standard'.
  • If quantity is less than 20, set volume_category to 'Small'.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 2
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: Categorize Sales Volume

Desliza para mostrar el menú

Tarea

Swipe to start coding

Write a query that selects all columns from the sales table and adds a new column named volume_category. The value of volume_category should be determined by the following rules:

  • If quantity is greater than or equal to 100, set volume_category to 'Bulk'.
  • If quantity is greater than or equal to 20 but less than 100, set volume_category to 'Standard'.
  • If quantity is less than 20, set volume_category to 'Small'.

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 1. Capítulo 2
single

single

some-alt