Complete the code to select all columns from the joined tables.
SELECT * FROM employees [1] departments ON employees.department_id = departments.id;The INNER JOIN keyword selects records that have matching values in both tables.
Complete the code to assign aliases to tables and select employee names and department names.
SELECT employees.name, d.name FROM employees [1] departments d ON employees.department_id = d.id;The JOIN keyword is shorthand for INNER JOIN and works the same here.
Fix the error in the code by completing the alias for the employees table.
SELECT e.name, d.name FROM employees [1] departments d ON e.department_id = d.id;Use AS e to assign the alias e to employees before joining.
Fill both blanks to correctly alias tables and join them on matching department IDs.
SELECT [1].name, [2].name FROM employees AS e INNER JOIN departments AS d ON e.department_id = d.id;
Use the aliases e and d to refer to the tables in the SELECT clause.
Fill all three blanks to select employee name, department name, and filter by department location.
SELECT [1].name, [2].name FROM employees AS e INNER JOIN departments AS d ON e.department_id = d.id WHERE [3].location = 'New York';
Use alias e for employees and d for departments. The location filter applies to the departments table alias d.