Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele 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

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 4
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

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

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 4
single

single

some-alt