Challenge: List All Customers and Their Orders
Aufgabe
Swipe to start coding
Write a query to list all customers and the amounts of their orders, showing NULL for customers who have not placed any orders.
- Use a
LEFT JOINto combine thecustomersandorderstables on thecustomer_idfield. - Select the
customer_idandnamefrom thecustomerstable, and theamountfrom theorderstable. - Ensure that all customers are included, even those who have not placed any orders.
- Sort the results by
customer_idand then byorder_id.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 4
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Großartig!
Completion Rate verbessert auf 4.76
Challenge: List All Customers and Their Orders
Swipe um das Menü anzuzeigen
Aufgabe
Swipe to start coding
Write a query to list all customers and the amounts of their orders, showing NULL for customers who have not placed any orders.
- Use a
LEFT JOINto combine thecustomersandorderstables on thecustomer_idfield. - Select the
customer_idandnamefrom thecustomerstable, and theamountfrom theorderstable. - Ensure that all customers are included, even those who have not placed any orders.
- Sort the results by
customer_idand then byorder_id.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 4
single