Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Total Sales Calculation | Aggregating and Grouping Data
Practice
Projects
Quizzes & Challenges
Questionários
Challenges
/
SQL for Data Analysis

bookChallenge: Total Sales Calculation

Tarefa

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.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 1
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Total Sales Calculation

Deslize para mostrar o menu

Tarefa

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.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 1
single

single

some-alt