Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Bestselling Products | Aggregating and Grouping Data
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL for Data Analysis

bookChallenge: Bestselling Products

Opgave

Swipe to start coding

Write a query to list each product_id and the total quantity sold, ordered by quantity descending.

  • Select product_id and the sum of quantity from the sales table.
  • Group the results by product_id.
  • Order the results by the total quantity in descending order.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 2
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?

What are some examples related to this topic?

Where can I learn more about this?

close

bookChallenge: Bestselling Products

Stryg for at vise menuen

Opgave

Swipe to start coding

Write a query to list each product_id and the total quantity sold, ordered by quantity descending.

  • Select product_id and the sum of quantity from the sales table.
  • Group the results by product_id.
  • Order the results by the total quantity in descending order.

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 2
single

single

some-alt