Challenge: List All Customers and Their Orders
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Чудово!
Completion показник покращився до 4.76
Challenge: List All Customers and Their Orders
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single