Complete the code to select all columns from two tables joined on a common column.
SELECT * FROM employees [1] departments ON employees.department_id = departments.id;The JOIN keyword combines rows from two tables based on a related column.
Complete the code to get employee names and their department names using a join.
SELECT employees.name, [1].name FROM employees JOIN departments ON employees.department_id = departments.id;We select the department name from the departments table.
Fix the error in the join clause to correctly join employees and departments.
SELECT * FROM employees JOIN departments ON employees.[1] = departments.id;The department_id in employees matches the id in departments.
Fill both blanks to select employee names and their project names using a join.
SELECT employees.[1], projects.[2] FROM employees JOIN projects ON employees.project_id = projects.id;
We select name from employees and title from projects.
Fill all three blanks to select employee names, department names, and project titles using joins.
SELECT employees.[1], departments.[2], projects.[3] FROM employees JOIN departments ON employees.department_id = departments.id JOIN projects ON employees.project_id = projects.id;
Select employee name, department name, and project title.
