Skip to content

SQL aassignment‐3

Sayan Bhattacharya edited this page Dec 4, 2025 · 8 revisions

1.Display the average salary for each department.

image

2.Find the maximum and minimum salary in each job title.

image

3.Display the number of employees working in each department.

image

4.Show the total salary expense for each manager.

image

5.List the average commission percentage of employees grouped by job_id.

image

6.Display departments having more than 5 employees using HAVING.

image

7.Find the total number of employees hired in each year

image

8.Show the department name and the total salary of employees whose total salary is above 50,000.

image

9. Find the average salary by job_id, but display only those jobs where the average salary is above 10,000.

image

10. Display each manager’s ID and the count of employees reporting to them.

image

11.List departments where the maximum salary exceeds 12,000.

image

12.Display the job_id having an average salary less than 7,000.

image

13.Find departments having more than one distinct job_id.

image

14.Show job titles where the total salary paid is more than 1,00,000.

image

15.Display locations having more than 2 departments

image

16.Display the details of employees who earn more than the average salary of their department.

image

17.Find employees whose salary is greater than the average salary of all employees.

image

18.Display the department name and average salary of those departments where the average salary is greater than the company-wide average.

image

19.List the employees who have the highest salary in their respective departments.

image

20.Display the employees whose salary is less than the minimum salary of department 90.

image

Clone this wiki locally