Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Total Sales Calculation | Aggregating and Grouping Data
SQL for Data Analysis

bookChallenge: Total Sales Calculation

Tarea

Swipe to start coding

Write a SQL query on the provided sales table to calculate two summary metrics in a single query:

  • The total number of sales records (rows) in the table.
  • The total sum of the quantity column across all sales records.

Your query must return both results as separate columns in a single row. Do not include any print statements or comments in your query. Use aggregate functions such as COUNT(*) and SUM(quantity) to obtain the required results.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

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

Desliza para mostrar el menú

Tarea

Swipe to start coding

Write a SQL query on the provided sales table to calculate two summary metrics in a single query:

  • The total number of sales records (rows) in the table.
  • The total sum of the quantity column across all sales records.

Your query must return both results as separate columns in a single row. Do not include any print statements or comments in your query. Use aggregate functions such as COUNT(*) and SUM(quantity) to obtain the required results.

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

single

some-alt