Challenge: Find Customers with Orders
Oppgave
Swipe to start coding
Write a query to return the names of all customers who have placed at least one order. Use an INNER JOIN between the customers and orders tables to accomplish this.
- Select the
namecolumn from thecustomerstable. - Use an INNER JOIN to combine rows from
customersandorderswhere thecustomer_idmatches in both tables. - Ensure only customers who have at least one matching order appear in the result.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. 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
Suggested prompts:
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Fantastisk!
Completion rate forbedret til 4.76
Challenge: Find Customers with Orders
Sveip for å vise menyen
Oppgave
Swipe to start coding
Write a query to return the names of all customers who have placed at least one order. Use an INNER JOIN between the customers and orders tables to accomplish this.
- Select the
namecolumn from thecustomerstable. - Use an INNER JOIN to combine rows from
customersandorderswhere thecustomer_idmatches in both tables. - Ensure only customers who have at least one matching order appear in the result.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 2
single