SQL I
SQL I
List out the employee id, last name in ascending order based on the employee
id.
2. List out the employee id, name in descending order based on salary column
3. list out the employee details according to their last_name in ascending order
and salaries in descending order
4. list out the employee details according to their last_name in ascending order
and then on department_id in descending order.
5. How many employees who are working in different departments wise in the
organization
6. List out the department wise maximum salary, minimum salary, average salary
of the employees
7. List out the job wise maximum salary, minimum salary, average salaries of the
employees.
8. List out the no.of employees joined in every month in ascending order.
9. List out the no.of employees for each month and year, in the ascending order
based on the year, month.
10. List out the department id having atleast four employees.
11. How many employees in January month.
12. How many employees who are joined in January or September month.
13. How many employees who are joined in 1985.
14. How many employees joined each month in 1985.
15. How many employees who are joined in March 1985.
16. Which is the department id, having greater than or equal to 3 employees
joined in April 1985.
17. Display the employee who got the maximum salary.
18. Display the employees who are working in Sales department
19. Display the employees who are working as �Clerk�.
20. Display the employees who are working in �New York�
21. Find out no.of employees working in �Sales� department.
22. Update the employees salaries, who are working as Clerk on the basis of 10%.
23. Delete the employees who are working in accounting department.
24. Display the second highest salary drawing employee details.
25. Display the Nth highest salary drawing employee details
26. List out the employees who earn more than every employee in department 30.
27. List out the employees who earn more than the lowest salary in department 30.
28. Find out whose department has not employees.
29. Find out which department does not have any employees.
47. Find out the employees who earn greater than the average salary for their
department.
48. List our employees with their department names
49. Display employees with their designations (jobs)
50. Display the employees with their department name and regional groups.
51. How many employees who are working in different departments and display with
department name.
52. How many employees who are working in sales department.
53. Which is the department having greater than or equal to 5 employees and
display the department names in ascending order.
54. How many jobs in the organization with designations.
55. How many employees working in �New York�.
56. Display employee details with salary grades.
57. List out the no. of employees on grade wise.
58. Display the employ salary grades and no. of employees between 2000 to 5000
range of salary.
59. Display the employee details with their manager names.
60. Display the employee details who earn more than their managers salaries.
61. Show the no. of employees working under every manager.
61. Display employee details with all departments.
62. Display all employees in sales or operation departments.
63. List out the distinct jobs in Sales and Accounting Departments.
64. List out the ALL jobs in Sales and Accounting Departments.
65. List out the common jobs in Research and Accounting Departments in ascending
order.