J075 DBMS Lab 6

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Experiment No.

Aim: To study and implement advance queries in oracle (Group by, order by, sub queries)

Part B

1. Show the department no, names and locations of the department where no sales
representatives work.
2. Show the department number and name and number of employees working in each
department that
a. Has fewer than three employees
b. Has the highest number of employees
c. Has the lowest number of employees
3. Show the employees number, last name, salary, department number and the avg salary in
their department for all employees.
4. Show all employees who were haired on the day of the week on which the highest number
of employees were hired.
5. Create an anniversary overview based on the hire date of employee. Sort the anniversaries
in ascending order
6. Write a compound query to produce a list of employees showing raise %, EMP ids and old
salary and new salary increase. Employees in department t10,50, 110 are given 5% raise,
employees in department 60 are given a 10 % raise, employees in department 20 and 80 are
given 15% raise and employees in department 90 are not given a raise
7. Write a query to display the employees ID and last names of employees who work in the
state of California
8. Write a SQL statement to display employee number, last name, start date and salary
showing De Haan’s direct reports.
1.
2.

3.
4.

5.
6.
7.
8.

You might also like