0% found this document useful (0 votes)
32 views

DML Business Database Management: by SHIVANI SURESH-1828638

This document provides SQL queries to retrieve information from the EMP table in a database. It includes 53 queries that display employee details like name, job, department, salary, date of joining, etc. based on various conditions. The queries use functions like DISTINCT, WHERE, BETWEEN, IN, LIKE, OR etc. to filter rows and select specific columns from the table.

Uploaded by

SHIVANI SURESH
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

DML Business Database Management: by SHIVANI SURESH-1828638

This document provides SQL queries to retrieve information from the EMP table in a database. It includes 53 queries that display employee details like name, job, department, salary, date of joining, etc. based on various conditions. The queries use functions like DISTINCT, WHERE, BETWEEN, IN, LIKE, OR etc. to filter rows and select specific columns from the table.

Uploaded by

SHIVANI SURESH
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

DML

Business Database Management

By
SHIVANI SURESH-1828638

Under the Guidance of


Prof. M. Kannika Nirai Vaani

Institute of Management
Christ (Deemed to Be University)
Bangalore
February 2019
1. Display all the information of the EMP table

2. Display unique Jobs from EMP table?


3. List the employees who joined before 1981.

4. List the employees who are working for the Deptno 10 or20.

5. List all the Clerks of Deptno 20.


6. Display the details of SMITH.

7.Display the location of SMITH.

8. List the employees whose salary is more than 3000 after giving 20% increment.

9. List the grade, EMP name for the deptno 10 or deptno 30 but salary grade is not 4 while they joined
the company before ’31-dec-82’.
10. List the employees those who joined in company before 15th of the month.

11. List the employees who are working as Managers.

12. List the Ename and Salary is increased by 15% and expressed as no.of Dollars.
13.Produce the output of EMP table ‘EMP_AND_JOB’ for Ename and Job.

14. Produce the following output from EMP.


EMPLOYEE
SMITH (clerk)
ALLEN (Salesman)
15. Display the unique department with jobs.

16. Display the details of the Blake.

17. List all the clerks.


18. List the empno, salary, commission of employees.

19. Display the unique department of the employees.


20. List all the employees joined on 1st may 81.

21. List the employees who are working as managers.

22. List the employees who are either clerks or managers.


23. List the employees who have joined on the following dates 1 may 81,17 Nov 81,30 Dec 81

24. List the employees who have joined in the year 1981.
25. List the employees whose annual salary ranging from 23000 to 40000.
26. List the employees working under the Managers 7369,7890,7654,7900.

27. List the employees who joined in the second half of 82.

28. Find out salary of both MILLER and SMITH.

29. Find out the names and salaries of all employees earning more than 1000 per One month.
30. Display the names and salaries of all employees except JAMES.

31. Display all the details of the employees whose Comm. Is more than their Salary.

32. List the employees Who Annual salary ranging from 22000 and 45000.
33. List the employee’s name, job that is without manager.

34. List the employee names starting with ‘M’.

35. List the employees end with ‘H’.

36. List the employees who joined in the year 81.


37. List the employees whose salary is ending with 00.

38. List the employee who joined in 80’s.

39. List the employee who are clerks who have experience more than 8ys.
40. List the Managers of dept 10 or 20.

41. Find out the details of employees whose names begin with ‘S’.

42. Find out the names of all employees that have ‘A’ anywhere in their name.
43. Find out the names of all employees that have ‘L’ as their third character in their name.

44. Find out the names of the employees whose name begin with ‘A’ or ‘M’.

45. Select the name, job, salary, department number of all employees except

AND
46. SALESMAN from department number 30.

47.List unique departments of the EMP table.

48. List the name and salary of employees who can earn more than 1500 and are in department 10 or 30.
Label the columns Employee and Monthly Salary respectively.

49. List the name and salary for all employees whose salary is not in the range of 1500 and 2850.

Select ename, sal from emp where (sal < 1500 and sal > 2850);
50. Display the name and job of all employees who do not have a MANAGER.

51. Display the name, job, and salary of all the employees whose job is MANAGER or ANALYST and their
salary is not equal to 1000, 3000, or 5000.

52. Display the name, salary and commission for all employees whose commission amount is greater
than their salary increased by 10%
53. Display the name of all employees who have two Ls in their name and are in department 30 or their
manager is 7782.

You might also like