Challenge: Above-Average Customers
Opgave
Swipe to start coding
Write a query using a subquery to find customers with total quantity purchased greater than the average quantity purchased.
- Calculate the total quantity purchased by each customer.
- Calculate the average total quantity purchased across all customers.
- Select only those customers whose total quantity purchased is greater than this average.
- Return the customer ID, first name, last name, and total quantity purchased for each qualifying customer.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 2
single
Spørg AI
Spørg AI
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 that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Fantastisk!
Completion rate forbedret til 5.56
Challenge: Above-Average Customers
Stryg for at vise menuen
Opgave
Swipe to start coding
Write a query using a subquery to find customers with total quantity purchased greater than the average quantity purchased.
- Calculate the total quantity purchased by each customer.
- Calculate the average total quantity purchased across all customers.
- Select only those customers whose total quantity purchased is greater than this average.
- Return the customer ID, first name, last name, and total quantity purchased for each qualifying customer.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 2
single