Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: City-Based Sales Analysis | Joining Tables for Richer Analysis
SQL for Data Analysis
Seksjon 3. Kapittel 4
single

single

Challenge: City-Based Sales Analysis

Sveip for å vise menyen

Oppgave

Sveip for å begynne å kode

You have two tables: sales and customers.

sales — records of each individual sale:

customers — information about customers:

Write a query that shows how many sales were made in each city. To do this:

  1. Join sales and customers on the customer_id column.
  2. Group the result by city.
  3. For each city, count the number of sales using COUNT() and name the column sales_count.

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 3. 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

some-alt