0% found this document useful (0 votes)
3 views6 pages

SQL Queries for Employee Reports

This document outlines 10 queries to run on a database management system. The queries include: displaying clerks hired before and after 1998; a report of non-commission earning employees sorted by first name; a report with each employee's name, hire date and salary; employees with no commission in every department; and more. The goal is to generate various reports from the employee database.

Uploaded by

Joshua Morales
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

SQL Queries for Employee Reports

This document outlines 10 queries to run on a database management system. The queries include: displaying clerks hired before and after 1998; a report of non-commission earning employees sorted by first name; a report with each employee's name, hire date and salary; employees with no commission in every department; and more. The goal is to generate various reports from the employee database.

Uploaded by

Joshua Morales
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Laboratory 12

Database Management System

1. Write a query that will display clerks who were hired before and after the year 1998.
Laboratory 12

Database Management System

2. The HR department needs a report of employees who doesn’t earn commission. Show the
last name, salary and job id. Sort data by first name.

3. Create a report that produces the following for each employee:


<​employee  last  name>  was  hired  <hire  date>  with monthly salary 
of <salary​>.
Laboratory 12

Database Management System

4. Write a query that displays those employees who have no commission for ​every
department​.
Laboratory 12

Database Management System

5. Display each employee’s last name, hire date and salary of every department. Format the
dates to appear in the format similar to “Mon, 29​th​ Day of February, Two Thousand Sixteen”.
Laboratory 12

Database Management System

6. Write a SQL statement that display employees last name with the number of years and the
number of completed months that they have been employed. The employee who has been
employed the longest should appear at the top of the list.

7. Show those employees who have a last name ending with letter “D”,”A”,”I” or “S”.
Laboratory 12

Database Management System

8. Create a report that display all employees and indicate with word ​Regular or ​Irregular
​ se CASE expression in your statement.
whether they receive a commission.​ U

9. Create a query that will display the total number of employees for job id Sales Clerk, Sales
Representative, IT Programmer and Admin Assistant.

10. Display job id where manager is managing less than 3 employees.

You might also like