You are on page 1of 1

DBMS Lab (Assignment 3)

Using the database of Assignment 2, write queries for the following:


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.

List names of employees whose name contains am.


List SSN of employees whose birth month is July.
List First name, SSN and BDate of employees whose birth date is falling within next 10 days.
List the details of the senior most (based on BDate) employee.
List number of employees in each department.
List the details of the highest paid employees from each department.
List the highest and lowest salary for both male and female employees.
List name and depno of employees who are working in the same department as employee with
SSN=333445555.
List name and depno of employees who are not working in the same department as employee
with SSN=333445555.
List number of employees working under each supervisor.
List name, SSN and salary of employees whose salary is more than the minimum salary of
Administration department.
List name, SSN and salary of employees whose salary is more than the minimum salary of
Administration department and less than the maximum salary of Research department.
List the name including SSN of employees who are at least a supervisor or a manager of a
department.
List the name including SSN of employees who are supervisors but not managers.
List the name including SSN of employees who are both supervisors and managers.

You might also like