Question 1: OUTER JOIN Types Overview
What are the types of OUTER JOINs in SQL?
Question 2: Basic LEFT OUTER JOIN
You have two tables: customers (customer_id, name) and orders (order_id, customer_id, amount). You want to list all customers, including those who have not placed any orders, along with their order amounts (which will be NULL for customers with no orders).
Question 3: LEFT JOIN vs INNER JOIN
What is the difference between LEFT JOIN and INNER JOIN?
Question 4: RIGHT OUTER JOIN vs. LEFT OUTER JOIN
You want to produce a list of all departments from a departments table (dept_id, dept_name), including those that currently have no employees assigned, by joining with an employees table (emp_id, name, dept_id). Which join should you use?
Question 5: RIGHT JOIN Functionality
How does RIGHT JOIN work in SQL?
Question 6: FULL OUTER JOIN Use Case
You have two tables listing projects: assigned_projects (project_id, project_name, owner) and completed_projects (project_id, completion_date). You need a complete list of all projects, showing their completion date if they are finished, and their owner if they are assigned. Some projects might be assigned but not finished, and others might be finished but not in the assigned list (e.g., historical projects).
Question 7: Multiple OUTER JOINs in Single Query
Can multiple OUTER JOINs be used in a single query?
Question 8: OUTER JOIN with WHERE Clause Filtering
What happens when WHERE clause filters on OUTER JOIN columns?
Question 9: OUTER JOIN Use Cases
When should OUTER JOINs be used instead of INNER JOINs?
Question 10: Filtering Outer Joins
Using a LEFT OUTER JOIN between customers and orders, you want to find only those customers who have not placed any orders.