Skip to content

02.Sql_3

eshan3101 edited this page Jul 5, 2026 · 1 revision

1.Write a query to display employee names and their department names. image

2.Display employee name, job title, and department name for all employees. image

3.List all employees who do not belong to any department. image

4.Write a query to show department names along with the city they are located in. image

5.Display employee name, manager name, and department name. image

6.List all employees who work in the same department as their manager. image

7.Show employees whose salary is greater than their manager’s salary. image

8.Display department name and the number of employees in each department. image

9.Write a query to show employees and their job grades based on salary range (assume job grades table exists or simulate using CASE). image

10.List all departments, including those with no employees. image

11.Display employees hired after their manager was hired. image

12.Show employee name, department name, country name, and region name. image

13.Write a query to find employees working in the ‘Sales’ department along with their location image

14.List employees whose department is located in the same city as their manager’s department. image

15.Display department name, average salary, and maximum salary in each department. image

16.Write a query to show employees who do not have a manager. image

17.Display job title and total salary paid for each job role. image

18.List employees working in departments located in the United States. image

19.Write a query to display employees and their previous job history (use JOB_HISTORY table). image

20.Display employees who changed jobs within the same department image

Clone this wiki locally