Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Customers from Specific Cities with Orders | Subqueries in E-commerce Analytics
Subqueries in SQL

bookChallenge: Customers from Specific Cities with Orders

Opgave

Swipe to start coding

Find all customers from either 'New York' or 'Los Angeles' who have placed at least one order.

  • Select the customer_id, name, and city columns from the customers table.
  • Only include customers whose city is either 'New York' or 'Los Angeles'.
  • Only include customers who have at least one matching customer_id in the orders table.
  • Use a subquery in your solution.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 5
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

close

bookChallenge: Customers from Specific Cities with Orders

Stryg for at vise menuen

Opgave

Swipe to start coding

Find all customers from either 'New York' or 'Los Angeles' who have placed at least one order.

  • Select the customer_id, name, and city columns from the customers table.
  • Only include customers whose city is either 'New York' or 'Los Angeles'.
  • Only include customers who have at least one matching customer_id in the orders table.
  • Use a subquery in your solution.

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 1. Kapitel 5
single

single

some-alt