Lab 5
BDAN 330
616578.docx 1 | P a g e D r . K i r k A t k i n s o n
1. Create a list of all fields from the employees table.
2. Retrieve a list with all female employees whose first name is Kellie.
3. Retrieve a list with all employees whose first name is either Kellie or
Aruna.
4. Create a list of all fields from employees table that are female and the first
name is either Kellie OR Aruna. (be wary of order of precedence!)
5. Use the IN operator to select all individuals from the “employees” table,
whose first name is either “Denis”, or “Elvis”.
6. Extract all records from the ‘employees’ table, aside from those with
employees named John, Mark, or Jacob.
7. Select all the information from the “salaries” table regarding contracts
from 66,000 to 70,000 dollars per year.
8. Retrieve a list with all individuals whose employee number is not between
‘10004’ and ‘10012’.
9. Using the views provided in the employees database,
a. List all from the first view
b. List all from the next view.
10. Create a view named new_view, it should consist of:
a. first name (employee table)
b. last name “ “
c. gender “ “
d. hire date “ “
e. Title (from title table)
11. Retrieve all rows using the View new_view.
At this point, please download the sqlscript files provided located on Bb
a) department_dup_create and
b) dept_manager_dup
Once saved on your PC/Mac, go to Workbench and run them (File – Run
SQL Script) one at a time and IN ORDER! Refresh your schemas in
Workbench, you should have two new tables. Use these new tables
through the balance of the lab where applicable.