5. Multiple tables
Aim: To combine data from several tables.
Demo: List the contents of two tables
Demo: Use the WHERE clause with two tables.
Task: List the employee names and the location of their department.
Demo: Restrict the rows displayed
Task: List the employees who earn over 1000 per month with their department names.
Task: List every employee with every salary range
Task: List every employee by name with their monthly salary and salary grade.
Demo: Table aliases - 1.
Demo: Table aliases - 2.
Demo: Table aliases - 3.
Task: Show the employee name and manager name for all employees in department 20.
Demo: Related data in more than two tables.
Task: Show the employee name, the manager name and the manager's department name.
Task: Show the employee name, manager name and the department names of both.
Task: Do managers manage staff in different department?
Read: Worksheet Completed
1. Introduction to the Emp-dept case study
2. Some simple SQL Select statements
3. Using Functions
4. Selecting ROWS to display
6. Summarising and Grouping
7. Handling Dates
8. Inner and Outer Joins