You are on page 1of 1

Employee Department

ID Name Salary Dept-id


1 A 1000 1
2 B 2000 1 Dept-id Dept name
3 C 3000 2 1 Maths
4 D 4000 2 2 Chemistry
5 E 5000 4 3 Physics

1Q. Write a query to get employee name & Salary.

2Q: Write a query to get department name and employee salary.

3Q: Write a query to get dept name, total salary from each department.

4Q: Write a query to get 2nd max salary of Employee table

5Q: Write a query to get Total Salary by all Departments

6Q: Write a query to get all employees, department name attached.

7Q: Write a query to sort department table based on total salaries.

8Q: Write a query to set the dept having salary more than 5000

You might also like