Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: List All Customers and Their Orders | Core Join Types and Their Applications
SQL Joins in Depth

bookChallenge: 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 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.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

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?

close

bookChallenge: 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 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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

some-alt