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

Practice for these exercises, we use the Employees Database Answer each question

ID: 3699942 • Letter: P

Question

Practice for these exercises, we use the Employees Database Answer each question with a single sat statement. Your query mus data in the Employees Database, not just the set of data we presented at the end ot Chapter 1 1. Find the names of all people who work in the Consulting department. Solve it ways: 11using only WHERE based join 0.e, no INNEROUTCROSSJINand 2) with CROSS JOIN. 2. Find the names of all people who work in the Consulting department and who spend more than 20%of their tame on the project with ID ADTAMFIA,Solve three ways: ) using only WHERE based join (.e.. no INNER/OUTER/CROSS JOIN) 2) using jOUN ON, and 3) using NATURAL JOIN whenever possible and JOIN ON otherwise. 3. Find the total percentage of time assigned to employee Abe Advice. Solve it two ways 1) using only wHERE-based join a.?., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN 4. Find the descriptions of all projects that require more than 70% of an employee's time. Solve it two ways: 1) using only wHERE-based join u.?.. no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN. - Practice 115 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: i) using only wHERE-based join (Le.. 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 (i.e., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN.

Explanation / Answer

Solution:

The first question is done as per Chegg guidelines, please repost others.

a)

With no join

SELECT firstname FROM employees. workson, projects, department WHERE (employees.employeeid= workson.employeeid) AND (workson.projectid= projects.projectid) AND (projects.deptcode= department.code) AND departments.name= 'consulting'.

b)

with cross join

SELECT firstname FROM employees CROSS JOIN workson ON (employees.employeeid= workson.employeeid) CROSS JOIN projects ON (projects.deptcode= department.code) CROSS JOIN department ON (workson.projectid= projects.projectid) WHERE departments.name= 'consulting'

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