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

Emp Table Question

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Emp Table Question

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

REFER the EMP/EMPL table:

1. A Query to return complete information about the employees.


2. A Query to find the salaries of all employees. Return salary.
3. A Query to find the unique designations of the employees. Return job name.
4. A Query to list the employees’ name, increased their salary by 15%, and expressed as number of Dollars.
5. A Query to list the employee's name and job name as a format of "Employee & Job".
6. A query in SQL to produce the output of employees as follows.
7. A Query to find those employees with hire date in the format like February 22, 1991. Return employee ID,
employee name, salary, hire date.
8. A Query to count the number of characters except the spaces for each employee name. Return employee
name length.
9. A Query to find the employee ID, salary, and commission of all the employees.
10. A Query to find the unique department with jobs. Return department ID, Job name.
11. A Query to find those employees who do not belong to the department 2001. Return complete information
about the employees.
12. A Query to find those employees who joined before 1991. Return complete information about the
employees.
13. A Query to calculate the average salary of employees who work as analysts. Return average salary.
14. A Query to find the details of the employee ‘BLAZE’.
15. A Query to identify employees whose commissions exceed their salaries. Return complete information
about the employees.
16. A Query to identify those employees whose salaries exceed 3000 after receiving a 25% salary increase.
Return complete information about the employees.
17. A Query to find the names of the employees whose length is six. Return employee name.
18. A Query to find out which employees joined in the month of January. Return complete information about the
employees.
19. A Query to separate the names of employees and their managers by the string 'works for'.
20. A Query to find those employees whose designation is ‘CLERK’. Return complete information about the
employees.
21. A Query to identify employees with more than 27 years of experience. Return complete information about
the employees.
22. A Query to find those employees whose salaries are less than 3500. Return complete information about the
employees.
23. A Query to find the employee whose designation is ‘ANALYST’. Return employee name, job name and
salary.
24. A Query to identify those employees who joined the company in 1991. Return complete information about
the employees.
25. A Query to find those employees who joined before 1st April 1991. Return employee ID, employee name,
hire date and salary.
26. A Query identify the employees who do not report to a manager. Return employee name, job name.
27. A Query to find the employees who joined on the 1st of May 1991. Return complete information about the
employees.
28. A Query to identify the experience of the employees who work under the manager whose ID number is
68319. Return employee ID, employee name, salary, experience.
29. A Query to find out which employees earn more than 100 per day as a salary. Return employee ID,
employee name, salary, and experience.
30. A Query to identify those employees who retired after 31-Dec-99, completing eight years of service. Return
employee name.
31. A Query to identify the employees whose salaries are odd. Return complete information about the
employees.
32. A Query to identify employees whose salaries contain only three digits. Return complete information about
the employees.
33. A Query to find those employees who joined in the month of APRIL. Return complete information about
the employees.
34. A Query to find out which employees joined the company before the 19th of the month. Return complete
information about the employees.
35. A Query to identify those employees who have been working as a SALESMAN and month portion of the
experience is more than 10. Return complete information about the employees.
36. A Query to find those employees of department id 3001 or 1001 and joined in the year 1991. Return
complete information about the employees.
37. A Query to find the employees who are working for the department ID 1001 or 2001. Return complete
information about the employees.
38. A Query to find those employees whose designation is ‘CLERK’ and work in the department ID 2001.
Return complete information about the employees.
39. A query in SQL to find those employees where -
1. the employees receive some commission which should not be more than the salary and annual salary including
commission is below 34000.
2. Designation is ‘SALESMAN’ and working in the department ‘3001’. Return employee ID, employee name,
salary and job name.
40. A Query to find those employees who are either CLERK or MANAGER. Return complete information
about the employees.
41. A Query to identify those employees who joined in any month other than February. Return complete
information about the employees.
42. A Query to find those employees who joined in the year 1991. Return complete information about the
employees.
43. A Query to identify the employees who joined the company in June 1991. Return complete information
about the employees.
44. A Query to search for all employees with an annual salary between 24000 and 50000 (Begin and end values
are included.). Return complete information about the employees.
45. A Query to identify all employees who joined the company on 1st May, 20th February, and 3rd December
1991. Return complete information about the employees.
46. A Query to find out which employees are working under the managers 63679, 68319, 66564, or 69000.
Return complete information about the employees.
47. A Query to find which employees joined the company after the month of June in 1991 and within this year.
Return complete information about the employees.
48. A Query to find those employees who joined in 90's. Return complete information about the employees.
49. A Query to find those managers who are in the department 1001 or 2001. Return complete information
about the employees.
50. A Query to identify employees who joined in the month of FEBRUARY with a salary range of 1001 to
2000 (Begin and end values are included.). Return complete information about the employees.
51. A Query to find those employees who joined before or after the year 1991. Return complete information
about the employees.
52. A Query to find employees along with their department details. Return employee ID, employee name, job
name, manager ID, hire date, salary, commission, department ID, and department name.
53. A Query to identify those employees who earn 60000 or more per year or do not work as ANALYST.
Return employee name, job name, (12*salary) as Annual Salary, department ID, and grade.
Sample table: EMP
Sample table: DEPT
Sample table: SAL_GRD

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.

You might also like