The hr department wants to determine the names of all

This preview shows page 10 - 12 out of 18 pages.

The HR department wants to determine the names of all employees who were hired after Davies. Create a query to display the name and hire date of any employee hired after employee Davies.
The HR department needs to find the names and hire dates for all employees who were hired before their managers, along with their managers’ names and hire dates. Save the script to a file named lab_04_04.sql.
Merise & SQL Exercices
5. Advanced Retrieval 5.1 Using Subqueries to Solve Queries The HR department needs a query that prompts the user for an employee last name. The query then displays the last name and hire date of any employee in the same department as the employee whose name they supply (excluding that employee). For example, if the user enters Zlotkey, find all employees who work with Zlotkey (excluding Zlotkey). Create a report that displays the employee number, last name, and salary of all
employees who earn more than the average salary. Sort the results by ascending salary. Write a query that displays the employee number and last name of all employees who
work in a department with any employee whose last name contains a “u”. Place your SQL statement in a text file name lab_05_01.sql.
The HR department needs a report that displays the last name, department number, and job id of all employees whose department location id is 1700.
Modify the query so that the user is prompted for a location id. Save this to a file named lab_05_02.sql.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture