Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: List All Customers and Their Orders | Core Join Types and Their Applications
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL Joins in Depth

bookChallenge: 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 JOIN to combine the customers and orders tables on the customer_id field.
  • Select the customer_id and name from the customers table, and the amount from the orders table.
  • Ensure that all customers are included, even those who have not placed any orders.
  • Sort the results by customer_id and then by order_id.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: 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 JOIN to combine the customers and orders tables on the customer_id field.
  • Select the customer_id and name from the customers table, and the amount from the orders table.
  • Ensure that all customers are included, even those who have not placed any orders.
  • Sort the results by customer_id and then by order_id.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

some-alt