Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Top 3 Customers | Advanced SQL for Data Analysis
SQL for Data Analysis

bookChallenge: Top 3 Customers

Oppgave

Swipe to start coding

Write a query to find the top 3 customers by total quantity purchased. Use a window function to rank customers by the sum of their purchased quantities.

  • Calculate the total quantity purchased for each customer.
  • Rank customers based on their total quantity purchased, with the highest quantity receiving rank 1.
  • Select only the top 3 customers according to this ranking.

Løsning

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 4. Kapittel 4
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

Suggested prompts:

Can you explain that in simpler terms?

What are the main benefits of this approach?

Are there any common mistakes to avoid with this?

close

bookChallenge: Top 3 Customers

Sveip for å vise menyen

Oppgave

Swipe to start coding

Write a query to find the top 3 customers by total quantity purchased. Use a window function to rank customers by the sum of their purchased quantities.

  • Calculate the total quantity purchased for each customer.
  • Rank customers based on their total quantity purchased, with the highest quantity receiving rank 1.
  • Select only the top 3 customers according to this ranking.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 4. Kapittel 4
single

single

some-alt