Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: High-Volume Customers | Aggregating and Grouping Data
SQL for Data Analysis

bookChallenge: High-Volume Customers

Opgave

Swipe to start coding

Write a query to list the customer_id and the total quantity purchased for each customer, but only include those customers whose total quantity purchased is greater than 5.

  • Select the customer_id and the sum of quantity as total_quantity from the sales table.
  • Group the results by customer_id.
  • Only include customers whose total quantity purchased is greater than 5.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 3
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

Can you explain this in simpler terms?

Can you give me an example?

What are the next steps I should take?

close

bookChallenge: High-Volume Customers

Stryg for at vise menuen

Opgave

Swipe to start coding

Write a query to list the customer_id and the total quantity purchased for each customer, but only include those customers whose total quantity purchased is greater than 5.

  • Select the customer_id and the sum of quantity as total_quantity from the sales table.
  • Group the results by customer_id.
  • Only include customers whose total quantity purchased is greater than 5.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 3
single

single

some-alt