Questions On Subqueries
Questions On Subqueries
4. list employees whose job is same as scott and their salary greater than smith’s salary
5. display all the employees whose job is same as scott and allen
10. display all the employees who are earning more than all the managers(job).
11. display all the employees who are earning more than any of the manager(job)
12. select empno, job and salary of all the analyst who are earning more than any of the
manager(job)
13. select the department name and location of all the employees working for clark.
14. select all the employees working for dallas
15. display all the employees whose salary is greater than avg sal of department 20
18. list the employees who has salary greater than allen
20. list the department names which are having salesmen in it.
21. display the employees whose location is having at least one ‘o’ in it.
22. list the department names that are having at least 1 employee in it.
23. list the department names that are having at least 4 employees in it
24. display the department names which are having at least 2 clerks in it
25. query to display the employee names who is having maximum salary in dept name
"accounting"
26. query to display the dept name who is having highest commission
27. query to display all the employees whose dept number is same as scott.
28. query to display all the employees in 'operations and accounting' dept. list the employees
31. list all the employees who are reporting to jones manager
33. display the departname of the employee whose name does not starts with s and salary
34. display location of employee whose salary is minimum salary but salary is greater than
2000
37. write a query to display all the employee whose job not same as allen and salary is
38. display all the employees who is having location is same as adam's manager
39. display the job, manager of employees who is working for jones?
40. display the employee names, higher date, commission of ford's manager?
41. display the number of employees who are getting salary less than the blake's manager
42. list employees who located in chicago and their commission is zero.
43. list employees who work for sales department and their salary greater
45. list employees who are working in research department and they are manager.
47. display department name of the employee who earn maximum salary and have no
reporting manager.
48. display employee details who are reporting to blake and have commission without using
49. list all the deptname and loc of all the salesman manager-manager's
50. list the employee deptname and loc of all the employees who are clerk ,reporting to blake
51. list the employees who does not directly report to president,have commission and salary
more than max salary of all the clerk without using null or not null
52. list the employees who joined after 2 years of first employee of the company and more
54. list all the employees whose job is same as jones and their salary lesser than scott
55. display the king's first year salary and his location with department
56. display all the employees of department 30, 20 with there anual salary and having atleast
3 employees
57. display department name which is having second highest average salary and third
58. display all the employees who are earn less than any of the salesman?
59. display all the employees who are joined before the last person?
62. display all the employees who are earning more than any of the manager.
63. list employees who joined after 4 years of 1st employee of the company and less than
blake salary.
64. display the department information of employee who is working for newyork location
65. display the salary wise employee information for deptno 20 in descending order
67. display location of employees, whose name doesn't start with a and salary between 1000
and 3000.
68. display department name of all the employees who are reporting to blake.
hired
71. display the employee name,job and department for those who don't have commission
72. display the employee details with their location who earn maximum commission
73. display all the employee whose department is sales and who is earning some
commission (i.e commission is not null or zero)and whose hired before the last person hired.
74. display all the department names and manager who is ward's manager's manager
75. display department names and maximum commission of employee's whose salary is
78. display department name of the employee who earn minmum salary and have reporting
manager.
79. display hiredate and dname of all the employees working for sales
81. display the dname of employees whoes salary is maximum salary but lesser than 3000
85. display the number of employees who work for research dept and their salary is lesser
87. display the department names that are having atleast one l in it.
88. display all the employees who are joined after blake.
89. list the dept name that are having at least 3 employees but not more than 5 employees in
it.
90. display the location of all employees whose reporting manager salary is greater than
2000.
91. select the employees whose dname is having at least two 'e' in it.
92. display ename,sal of employees who are earning more than any of the analyst.
93. select all the employees who are working for chicago
94. query to display employee names who is having minimum salary in department research
96. list the department names that are having at least 3 employes in it.
97. list employees from research and accounting department having atleast two reporting
98. write a query to display employee name, job,dname,location of all employees who are
99. select ename,dname of employee who earns 2nd max salary and works for location
dallas.
100. write a query to display the employee information who is not taking commission and
101. list employees from sales and research department having atleast 2 reporting employees
102. list employees who have commission greater than maximum salary of all the salesman
103. display the location of all the deaprtments which have employees joined in the year 81
104. display department wise minimum salary which is less than average salary of employees.
106. display all the employee information who are living in a location which is having at least 2
'o' in it.
107. display the names of employee from department number 10 with salary greater than that
108. display the names of employees who earn highest salary in their respective jobs.
109. display the employee number and name of employee working as clerk and earning
112. list the department names in which the employees are hired between 1st of jan 1981 and
113. display location of the employee who earn maximum salary and have no reporting
manager
114. list employees who works for accounting department and their salary greater than
116. list the employees who does not directly report to president,have commission and salary
more than max salary of all the clerk without using null or not null
117. display all the employees whose salary is greater than avg sal of department 20
118. list the employee deptname and loc of all the employees who are clerk ,reporting to
121. display empno, ename, job, whose job has 'e' in it and display empno in descending
order.
122. display dname, loc,deptno of employees who has same reporting manager???
123. display avg salary of all employees whose dept name is accounting???
124. display all employees details whose hiredate is in year 81???
127. list the employees whose daily salary is greater than 150 and who are joined before 1982
only.
128. query to display the employee names whose name as 2nd character should be 'o'