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

single

bookChallenge: Total Sales Calculation

Desliza para mostrar el menú

Tarea

Desliza para comenzar a programar

Write a SQL query against the sales table that returns two summary metrics in a single row.

  • Return exactly one row with two columns:
    • total_sales — total number of rows in the table, using COUNT(*)
    • total_quantity — total sum of the quantity column, using SUM(quantity)
  • Use a single SELECT statement with no subqueries
  • Do not use WHERE, GROUP BY, or any filtering — aggregate the entire table
  • Column aliases must match exactly: total_sales and total_quantity

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

Pregunte a AI

expand

Pregunte a AI

ChatGPT

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

some-alt