Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

5. For each employee, list the employee ID, number of projects, and the total pe

ID: 3699959 • Letter: 5

Question

5. For each employee, list the employee ID, number of projects, and the total percentage of time for the current projects to which she is assigned. Include employees not assigned to any project. 6. Find the description of all projects with no employees assigned to them 7. For each project, find the greatest percentage of time assigned to one employee. Solve it two ways: 1) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN 8. For each employee ID, find the last name of all employees making more money than that employee. Solve it two ways: 1) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN 9. Rank the projects by revenue. Solve it two ways: 1) using only WHERE-based join d.e., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN.

Explanation / Answer

Solution:

5, 6, 7 a, 7 b is solved as per Chegg guidelines, please repost others.

5)

Query:

SELECT employeeid, COUNT(workson.projectid), workson.assignedtime FROM employees INNER JOIN workson ON (employees.employeeid= workson.employeeid) INNER JOIN projects ON (workson.projectid= projects.projectid)

6)

SELECT projects.description FROM employees INNER JOIN workson ON (employees.employeeid= workson.employeeid) INNER JOIN projects ON (workson.projectid= projects.projectid) WHERE workson.project IS NULL

7)

a)

With no join

SELECT MAX(assignedtime) FROM employees.workson, projects, department WHERE (employees.employeeid= workson.employeeid) AND (workson.projectid= projects.projectid)

b)

SELECT MAX(assignedtime) FROM employees INNER JOIN workson ON (employees.employeeid= workson.employeeid) INNER JOIN projects ON (workson.projectid= projects.projectid) WHERE workson.project


I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote