1. Write a query to find employees who have the second highest salary.
2. Retrieve the names of employees who have the same salary as at least one other employee.
3. Find the department with the highest average salary.
4. Retrieve the top three highest-paid employees in each department.
5. Find the employees who have been working for more than 10 years.
6. Write a query to display the first three characters of each employee's first name.
7. Retrieve employees who earn more than the department’s average salary.
8. Find employees who do not have any dependents.
9. Write a query to get the employee with the longest tenure in the company.
10. Retrieve employees who have a salary in the top 10% of all salaries.
11. List all employees who have the same manager.
12. Write a query to find employees who have no assigned projects.
13. Retrieve the names of employees whose salaries are within 5% of the highest salary.
14. Find the difference between the highest and lowest salary in each department.
15. Write a query to get the total number of employees who have received bonuses.
16. Retrieve the top-performing employee from each department.
17. List employees who were hired in the last three months.
18. Find the department with the lowest number of employees.
19. Retrieve the employee who has received the highest total compensation (Salary + Bonus +
Commission).
20. Write a query to find the most common job title in the company.
21. Retrieve employees who work in the same city as their manager.
22. Find employees whose salaries have increased by more than 20% in the last year.
23. Write a query to identify employees who have changed departments.
24. Retrieve employees who have worked on more than 3 projects.
25. Find employees who have taken the most overtime hours.
26. Write a query to identify employees who have been promoted.
27. Retrieve employees who have certifications related to their job title.
28. Write a query to find employees who have a performance rating below the company’s
average.
29. Retrieve employees who have completed at least one external training program.
30. Find employees who have been hired on the same date as another employee.
31. Write a query to display the employee names and their department’s total salary budget.
32. Find employees who have received at least two different types of bonuses.
33. Write a query to identify employees who have been in multiple job titles within the
company.
34. Retrieve employees who have never taken overtime hours.
35. Write a query to list employees and their respective reporting managers.
36. Find employees who have the same first and last name.
37. Write a query to identify the department with the longest average employee tenure.
38. Retrieve employees whose salaries are above the 75th percentile.
39. Write a query to find employees who have relocated to a different office location.
40. Retrieve employees whose total compensation (salary + bonus + commission) is the highest
in their department.
41. Write a query to find the difference in salary between employees and their direct manager.
42. Retrieve employees who were hired before a specific date but still work in the company.
43. Find the number of employees grouped by marital status.
44. Write a query to retrieve employees who have worked in multiple shifts.
45. Retrieve employees who have received the same performance rating for three consecutive
years.
46. Write a query to find the manager with the highest number of direct reports.
47. Retrieve employees who are fluent in more than two languages.
48. Find employees who have the highest experience but the lowest salary in their department.
49. Write a query to find the job title with the highest retention rate.
50. Retrieve employees who have worked the same number of overtime hours as another
employee.