Question: CIN623 - Assignment 2 Due Date: 7/1/22 SOL Weighting: 10% The following are the four tables extracted out of a company database. Employees belong to

CIN623 - Assignment 2 Due Date: 7/1/22 SOL Weighting: 10% The following are the four tables extracted out of a company database. Employees belong to certain department and they are responsible for working on various projects developed by the company. Employee Department SSN S123 S333 S222 S444 S555 Name John Smith Yee Wong Lee Wong Borg Smith Albert Salary 30000 41000 25000 25000 31000 29000 DNumber 5 3 DateJoin 12/10/01 10/22/02 10/25/02 01/13/01 11/01/01 11/01/01 DNumber 5 5 4 3 5 5 Dname Research Marketing Production 4 S666 Aline Project PNumber P1 P2 P3 P4 Hours 32 PName Productz ProductX ProductY Product DNumber 5 3 2 4 PLocation Houston Stafford Houston Bellair Works_On SSN S123 S123 S222 S444 S333 PNumber P1 P2 P1 P2 P4 20 10 30 Using the tables given above, develop the SQL syntax needed to answer the queries below: a) Display the names and salaries of people working in department 5 with salary of more than 30000. (2 Marks) b) (3 Marks) What is the total and average hour spent on each project? Retrieve the name of department responsible for developing P4. c) (3 Marks) d) Display details of employees who joined the department employee name. year 2002 in descending order of (3 Marks) e) Find the names and salaries of employees who have worked on a project for more than 10 hours. (2 Marks) f) Give the project name and department names of all departments, which are looking after a project in Houston (2 Marks) g) Find the total number of employees in department 3 and sum of their salaries. (3 Marks) h) Give a 5% increase in salary of all employees of department 5. (2 Marks) 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
