A data-integrity report lists every order, together with the buyer's name when the buyer exists. Order 4 refers to user 99, who is not in users; it must still be listed, with a NULL name. Users who have placed no orders are not part of this report.
Write a query returning orders.id as order_id and users.name, keeping every order, using a RIGHT JOIN with users on the left and orders on the right.
order_id, nameusers as the left table and orders as the right tableA right join keeps all rows from the table written after JOIN.
FROM users u RIGHT JOIN orders o ON ...
No results yet
Run your code to check it against the examples, or submit to run every test.