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

bookChallenge: Total Sales Calculation

Taak

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.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 1
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookChallenge: Total Sales Calculation

Veeg om het menu te tonen

Taak

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.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 1
single

single

some-alt