Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Segment Sales Data | Aggregations for KPIs
SQL for Business Intelligence Analysts

bookChallenge: Segment Sales Data

Завдання

Swipe to start coding

Write two SQL queries using the existing sales table to analyze sales performance by product and by customer.

  • The first query must return each product_id along with the total sales amount for that product. Use SUM(total_amount) and group by product_id.
  • The second query must return each customer_id along with the number of orders placed by that customer. Use COUNT(sale_id) and group by customer_id.

Рішення

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

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

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

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

single

Запитати АІ

expand

Запитати АІ

ChatGPT

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

Suggested prompts:

Can you explain this in simpler terms?

What are the main takeaways from this?

Can you give me a real-world example?

close

bookChallenge: Segment Sales Data

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

Завдання

Swipe to start coding

Write two SQL queries using the existing sales table to analyze sales performance by product and by customer.

  • The first query must return each product_id along with the total sales amount for that product. Use SUM(total_amount) and group by product_id.
  • The second query must return each customer_id along with the number of orders placed by that customer. Use COUNT(sale_id) and group by customer_id.

Рішення

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

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

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

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

single

some-alt