Reference no: EM132302299
1. Write a SQL statement which joins the faculty_department table with the department table. This query should return the faculty_id and the department_id columns from the faculty_department table, and the name column from the department table. The join between the two tables should be an inner join.
2. Write a SQL statement which joins the faculty_department table with the department table. This query should return the faculty_id and the department_id columns from the faculty_department table, and the name column from the department table. The join between the two tables should be an outer join. The query should return all rows from the faculty_department table whether or not they have a corresponding row (a joined rodew, a row with the same department_id) in the department table.
3. Write a SQL statement which joins the faculty_department table with the department table. This query should return the faculty_id and the department_id columns from the faculty_department table, and the name column from the department table. The join between the two tables should be an outer join. The query should return all rows from the department table whether or not they have a corresponding row (a joined row, a row with the same department_id) in the faculty_department table.
4. Write a SQL statement which joins the faculty_department table with the faculty table. Select the first_name and last_name from the faculty table and the department_id from the faculty_department table. This should be an inner join.
5. Write a query which joins the faculty table with the faculty_department table with the department table. The query should return the first_name and last_name from the faculty table, and the name column from the department table. This should be an inner join.
Extra Credit
6. Write a query which identifies both the faculty who have been assigned to a department, and the faculty who have NOT been assigned to a department (no corresponding records in the faculty_department table). The query should return the faculty first name and last name and the name of the department. This query should use an outer join.