Emp Table Question
Emp Table Question
54. A Query to identify employees whose salaries are higher than their managers' salaries. Return employee
name, job name, manager ID, salary, manager name, manager's salary..
55. A Query to find those employees whose salary is between 2000 and 5000 (Begin and end values are
included.) and location is PERTH. Return employee name, department ID, salary, and commission.
56. A Query to find the employees whose department ID is 1001 or 3001 and whose salary grade is not 4. They
joined the company before 1992-12-31. Return grade, employee name.
57. A Query to find those employees whose manager name is JONAS. Return employee id, employee name, job
name, manager ID, hire date, salary, department ID, employee name.
58. A Query to find the name and salary of the employee FRANK. Salary should be equal to the maximum
salary within his or her salary group.
Sample table: EMP
Sample table: SAL_GRD
59. A Query to search for employees who are working either as a MANAGER or an ANALYST with a salary
between 2000 and 5000 (Begin and end values are included.) without commissions. Return complete information
about the employees.
60. A Query to search for employees working in PERTH or MELBOURNE and month part of their achieved
experience is more than 10. Return employee ID, employee name, department ID, salary, and department
location.
61. A Query to find the employees who joined in 1991 and whose department location is SYDNEY or
MELBOURNE with a salary range of 2000 to 5000 (Begin and end values are included.). Return employee ID,
employee name, department ID, salary, and department location.
62. A Query to find the employees of MARKETING department come from MELBOURNE or PERTH, are in
grades 3 ,4, and 5 and have at least 25 years of experience. Return department ID, employee ID, employee name,
salary, department name, department location and grade.
Sample table: EMP
Sample table: SAL_GRD
Sample table: DEPT
63. A Query to find those employees who are senior to their manager. Return complete information about the
employees.
64. From the following tables, A Query to determine which employees have a grade of 4 and a salary between
the minimum and maximum. Return all information of each employees and their grade and salary related details.
65. A Query to find those employees who joined after 1991, excluding MARKER or ADELYN in the
departments PRODUCTION or AUDIT. Return employee name.
Sample table: EMP
Sample table: DEPT
Sample table: SAL_GRD
66. A Query to find the employees and their salaries. Sort the result-set in ascending order by salaries. Return
complete information about the employees.
67. A Query to list employees in ascending order on department ID and descending order on jobs. Return
complete information about the employees.
68. A Query to sort the unique jobs in descending order. Return job name.
69. A Query to rank the employees according to their annual salary in ascending order. Return employee ID,
employee name, monthly salary, salary/30 as Daily_Salary, and 12*salary as Anual_Salary.
70. A Query to find those employees who are either 'CLERK' or 'ANALYST’. Sort the result set in descending
order on job_name. Return complete information about the employees.
71. A Query to find the department location of employee ‘CLARE’. Return department location.
72. A Query to find those employees who joined on 1-MAY-91, or 3-DEC-91, or 19-JAN-90. Sort the result-set
in ascending order by hire date. Return complete information about the employees.
73. A Query to find those employees who earn less than 1000. Sort the result-set in ascending order by salary.
Return complete information about the employees.
74. A Query to list the employees in ascending order based on salary. Return complete information about the
employees.
75. A Query to list the employees in the ascending order by job title and in descending order by employee ID.
Return complete information about the employees.
76. A Query to list the unique jobs of department 2001 and 3001 in descending order. Return job name.
77. A Query to list all the employees except the PRESIDENT and the MANAGER in ascending order of
salaries. Return complete information about the employees.
78. A Query to find the employees whose annual salary is less than $25,000 per year. Sort the result set in
ascending order of the salary. Return complete information about the employees.
79. A Query to list the employees who works as a SALESMAN. Sort the result set in ascending order of annual
salary. Return employee id, name, annual salary, daily salary of all the employees.
80. A Query to list the employee ID, name, hire date, current date and experience of the employees in ascending
order on their experiences.
81. A Query to list the employees in ascending order of designations of those joined after the second half of
1991.
82. A Query to find the location of all the employees working in the FINANCE or AUDIT department. Sort the
result-set in ascending order by department ID. Return complete information about the employees.
Sample table: EMP
Sample table: DEPT
83. From the following tables, A Query to find the employees along with grades in ascending order. Return
complete information about the employees.
Sample table: EMP
Sample table: SAL_GRD
84. A Query to find the employees according to the department in ascending order. Return name, job name,
department, salary, and grade.
Sample table: EMP
Sample table: DEPT
Sample table: SAL_GRD
85. A Query to select all employees except CLERK and sort the results in descending order by salary. Return
employee name, job name, salary, grade and department name.
Sample table: EMP
Sample table: DEPT
Sample table: SAL_GRD
86. A Query to find those employees who work in the department 1001 or 2001. Return employee ID, name,
salary, department, grade, experience, and annual salary.
Sample table: EMP
Sample table: DEPT
Sample table: SAL_GRD
87. A Query to list the details of the employees along with the details of their departments.
Sample table: EMP
Sample table: DEPT
88. A Query to list the employees who are senior to their MANAGERS. Return complete information about the
employees.
89. A Query to find those employees who work in the department 1001. Sort the result-set in ascending order by
salary. Return employee ID, employee name, salary and department ID.
90. A Query to find the highest salary. Return highest salary.
91. A Query to calculate the average salary and average total remuneration (salary and commission) for each
type of job. Return name, average salary and average total remuneration.
92. A Query to calculate the total annual salary distributed across each job in 1991. Return job name, total
annual salary.
93. A Query to list the employee id, name, department id, location of all the employees.
Sample table: EMP
Sample table: DEPT
94. A Query to find those employees who work in the department ID 1001 or 2001. Return employee ID,
employee name, department ID, department location, and department name.
Sample table: EMP
Sample table: DEPT
95. A Query to find those employees whose salary is in the range of minimum and maximum salary (Begin and
end values are included.). Return employee ID, name, salary and grade.
Sample table: EMP
Sample table: SAL_GRD
96. A Query to create a list of the managers and the number of employees they supervise. Sort the result set in
ascending order on manager. Return manager ID and number of employees under them.
97. A Query to count the number of employees in each designation of a department. Return department id, job
name and number of employees.
98. A Query to identify the departments in which at least two employees are employed. Return department id,
number of employees.
99. A Query to list the grade, number of employees, and maximum salary of each grade.
Sample table: EMP
Sample table: SAL_GRD
100. A Query to identify departments with at least two SALESMEN in each grade. Return department name,
grade and number of employees.
Sample table: EMP
Sample table: DEPT
Sample table: SAL_GRD
101. A Query to identify departments with fewer than four employees. Return department ID, number of
employees.
102. A Query to find which departments have at least two employees. Return department name, number of
employees.
Sample table: EMP
Sample table: DEPT
103. A Query to check whether the employees ID are unique or not. Return employee id, number of employees.
104. A Query to find number of employees and average salary. Group the result set on department id and job
name. Return number of employees, average salary, department ID, and job name.
105. A Query to identify those employees whose names begin with 'A' and are six characters long. Return
employee name.
106. A Query to find those employees whose name is six characters in length and the third character must be 'R'.
Return complete information about the employees.
107. A Query to find those employees whose name is six characters in length, starting with 'A' and ending with
'N'. Return number of employees.
108. A Query to find those employees who joined in the month of where the second letter is 'a'. Return number
of employees.
109. A Query to find those employees whose names contain the character set 'AR' together. Return complete
information about the employees.
110. A Query to find those employees who joined in 90's. Return complete information about the employees.
111. A Query to find those employees whose ID not start with the digit 68. Return employee ID, employee ID
using trim function.
112. A Query to find those employees whose names contain the letter 'A’. Return complete information about
the employees.
113. A Query to find those employees whose name ends with 'S' and six characters long. Return complete
information about the employees.
114. A Query to find those employees who joined in any month, but the month name contain the character ‘A’.
Return complete information about the employees.
115. A Query to find those employees who joined in any month, but the name of the month contain the
character ‘A’ in second position. Return complete information about the employees.