Index
Contents
Start
End
Print
Help
Data Model
MySQL Reference
5. Multiple tables
Worksheet Overview
Aim: To combine data from several tables.
Contents
1.
Demo: List the contents of two tables
2.
Demo: Use the WHERE clause with two tables.
3.
Task: List the employee names and the location of their department.
4.
Demo: Restrict the rows displayed
5.
Task: List the employees who earn over 1000 per month with their department names.
6.
Task: List every employee with every salary range
7.
Task: List every employee by name with their monthly salary and salary grade.
8.
Demo: Table aliases - 1.
9.
Demo: Table aliases - 2.
10.
Demo: Table aliases - 3.
11.
Task: Show the employee name and manager name for all employees in department 20.
12.
Demo: Related data in more than two tables.
13.
Task: Show the employee name, the manager name and the manager's department name.
14.
Task: Show the employee name, manager name and the department names of both.
15.
Task: Do managers manage staff in different department?
16.
Read: Worksheet Completed
Related worksheets
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