Lab #2, Due 2/15/2011
All exercises will be completed using your class login (c183_#) on the class server.
Using the HR schema (which has been created in your class login), complete the following questions:
After Lesson 2: 1. The HR department needs a report that displays the last name and salary of employees who earn more than $12,000. 2. Write a query that displays the last name and department number for employee number 176. 3. Write a query to display the last name and salary for any employee whose salary is not in the range of $5,000 to $12,000. 4. Create a report to display the last name, job ID, and hire date for employees with the last names of Matos and Taylor. Order the query in ascending order by the hire date. Label your columns with descriptive column aliases. 5. Display the last name and department ID of all employees in departments 20 or 50 in ascending alphabetical order by name. 6. The HR department needs reports that displays the last name and hire date for all employees who were hired in 1994. 7. Create a report to display the last name and job title of all employees who do not have a manager. 8. Create a report to display the last name, salary, and commission of all employees who earn commissions. Sort data in descending order of salary and commissions.
Use the column’s numeric position in the ORDER BY clause. 9. Members of the HR department want to have more flexibility with the queries that you are writing. They would like a report that displays the last name and salary of employees who earn more than an amount that the user specifies after a prompt. 10. The HR department wants to run reports based on a manager. Create a query that prompts the user for a manager ID and generates the employee ID, last name, salary, and department for that manager’s employees. The HR department wants the ability to sort the report on a selected column. 11. Display all employee’s names in which the