Challenge: Above-Average Customers
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 2
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 5.56
Challenge: Above-Average Customers
Sveip for å vise menyen
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 2
single