Company Management System Assignment
Company Management System Assignment
SQL Questions
1. Retrieve all employees along with their department names.
2. Find employees who have worked on projects and list their names, project names, and hours
worked.
3. Get the total salary (salary + bonus) of each employee by joining the Employees and
Salaries tables.
4. List all employees and their projects, including those who are not assigned to any project.
5. Retrieve all projects along with the employees assigned to them, including projects with no
employees assigned.
6. Find employees who have not been assigned any project.
7. Retrieve employees whose name starts with ‘A’.
8. Extract the domain name from each employee's email.
9. Find the total number of employees.
10. Calculate the average salary of employees.
11. Find the highest salary among employees.
12. Find the department with the highest number of employees.
13. Get the total hours worked by each employee.
14. Find employees earning more than the average salary.
15. Find the employee who has worked the most hours on a project.
16. Retrieve projects that have at least two employees working on them.
17. Get the department with the highest total salary.