pr01 - SQL - DML - Exercises - 2025
pr01 - SQL - DML - Exercises - 2025
12. List the average salary of those departments which has average salary greater than 2000!
13. List the average salary of those departments which has more than 4 workers!
14. Who has the same salary and works on the same department than MARTIN (CROSS JOIN)
15. Which employees work on a department located at Boston or Chicago? (JOIN, NATURAL JOIN)
17. Select the employees with their job who have the lowest/highest salary!
18. List the lowest salary for every department where the lowest salary is below the lowest salary of dept. 30
20. Which dept. has no employee? (OUTER JOIN or SUBQUERY with NOT EXIST )
21. Determine the number of employees for every deptartment! (0 where the dept has no employee)
DELETE:
25. Delete the employees who has lower salary than tha average!
27. Delete the departments which have at least 2 employee in the second salary grade (SALGRADE table)
INSERT:
28. Insert a new employee called ’Williams’ to the EMP table. Empno=1, ename=' Williams ', deptno=10,
hire_date=today, sal=average salary of dept. 10. Rest of the attributes be NULL.
UPDATE: