all problems

Join orders to customers

sqleasyJOIN

Return order id (as order_id), customer name (as customer_name) and order_date for every completed order, sorted by order_id.

hint ladder

query.sql
loading editor…
step inspector

Write a query with WITH … AS (…) blocks, then inspect each intermediate table before the final SELECT.

output

Run your code to see its output, or check your solution to grade it.

Reference solution

The shape we check against. Compare it with your query: the set of rows matters, the formatting does not.

SELECT o.id AS order_id, c.name AS customer_name, o.order_date FROM orders o JOIN customers c ON c.id = o.customer_id WHERE o.status = 'completed' ORDER BY o.id;

Code is blurred until you solve this problem — the reasoning stays readable.