Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Total Sales Calculation | Aggregating and Grouping Data
SQL for Data Analysis

bookChallenge: Total Sales Calculation

Завдання

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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 1
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Total Sales Calculation

Свайпніть щоб показати меню

Завдання

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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 1
single

single

some-alt