Complete the code to select all customers and their orders using a LEFT JOIN.
SELECT customers.name, orders.order_id FROM customers [1] orders ON customers.id = orders.customer_id;The LEFT JOIN returns all customers even if they have no orders.
Complete the code to get all employees and their department names, including employees without a department.
SELECT employees.name, departments.name FROM employees [1] departments ON employees.dept_id = departments.id;LEFT JOIN ensures all employees appear, even those without a department.
Fix the error in the LEFT JOIN query to include all products and their categories.
SELECT products.name, categories.name FROM products [1] categories ON products.category_id = categories.id;LEFT JOIN returns all products, even those without a category.
Fill both blanks to select all students and their grades, including students without grades.
SELECT students.name, grades.score FROM students [1] grades ON students.id [2] grades.student_id;
LEFT JOIN keeps all students, and the ON condition uses '=' to match student IDs.
Fill all three blanks to select all orders, their customers, and order dates, including orders without customers.
SELECT orders.id, [1], orders.order_date FROM orders [2] customers ON orders.customer_id [3] customers.id;
LEFT JOIN keeps all orders, matching customers by customer_id with '='.