Challenge: List All Customers and Their Orders
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Fantastico!
Completion tasso migliorato a 4.76
Challenge: List All Customers and Their Orders
Scorri per mostrare il menu
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4
single