Write and execute SQL queries for the following tasks. Make suitable assumptions where necessary.
(a) Create the Employees table with EmpID as the primary key and DeptID as a foreign key referencing the Departments table. The Salary should not be negative. (4 Marks)
(b) List the names and salaries of all employees working in the 'Technology' department, sorted in descending order of their salary.
(c) Find the name of each department and the number of employees working in it. Display only those departments that have more than 10 employees.
(d) Find the names of all employees whose salary is greater than the average salary of all employees in the company.
(e) List the names of all projects along with the name of the employee who is leading the project.
__________ _________ _____ ___ __________ ________ ______ ___.
________ _____ __________ _____ ______ _______ ____ __________.
________ ________ __________ _________ ________ __________ ____ __________ _________.
___ _____ __________ ____ _________ __________ ______ ________ _______ ___ _______ ____.
_____ ____ ________ __________ _____.
________ _________ _____ ___ ________ ______ ______.
____ ____ _____ _______ _____ ____ ____ ____ _______ __________.
__________ _______ _____ ________ ____ ________.
___ _________ ________ _______ ___ ____ ____ ___ ____ _________ ______ ____.
________ ____ ________ __________ __________ ______ _____ _______ ______ _____.
_______ _____ ________ _____ __________ ___ ___ _______ ________.
__________ _____ ________ _____ _______ _____ ____ _______ _______.
_____ ______.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
✓ Unlock up to 60% of the answer
✓ No payment required