Lab 3

You might also like

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

QUERIES

1. Give all data of employee whose salary between 5000 and 10000 and find Length of the names of
all employees names.
2. Show the employee names like‘s%’ or ‘_a%’ and names must show in Upper Case as “FARHAN”.
3. Concatenate names of employees and the job.
4. 3rd Letter” of all employees who have department number greater than ten.
5. Give locations of ‘L’ in names of employees and find Length of names.
6. Give employee name, salary as “Annual Sal”, whose hire-date is ’17dec-1980’ and commission
greater than 300 in ascending order and names Display in Lower case as “farhan”.
7. Show all the employees those Salary greater than 5000, and job is either “salesman” or “manager”.
8. Give distinct salary and employee names, whose department name as department name of “Allen”.

9. Show employee salary, department data in descending order.


10. Show all employee names having double A in their names OR double L in INITCAP.
11. Give salary grade of only those employees whose Manager is 7902 or department id is 30 and
location is Boston or department name is “Operations”.
12. Show all employee names whose first character of their names can be any but second character
should be A or U.
13. Give name, salary, location and salary grade of employees those salary is 5 times of their
commission and name contains “a”.
14. Give all data of employees whose salary is less than average salary and department id is 20.
15. Give names and department id of those employees whose one third salary is greater than 6000.
16. Give name, salary and location of all non-commissioned employees and order by Depart_Id.
17. Give name and hire date of all employees those department name ‘Sales’ OR ‘Operations’.
18. Show commission as “BONUS” of all those employees whose Job is not equal to ‘Clerk’ OR
‘Salesman’.
19. Show Employee Number, salary AND Hire date of all those employees whose job is ‘Manager’ or
‘Salesman’.
20. Give employee number and name of employees whose department id is less than 50 and their
commission is less than 20% of their salary.

You might also like