Question: For these exercises, we use the Employees Database presented in the other picture. Answer each question with a single SQL statement. Your query must work

For these exercises, we use the Employees Database presented in the other picture. Answer each question with a single SQL statement. Your query must work for any set of data in the Employees Database, not just the set of data we provide.

1. Find the names of all people who work in the Consulting department and who spend more than 20% of their time on the project with ID ADT4MFIA. Solve three ways:

A) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN),

B) using JOINON

C) using NATURAL JOIN whenever possible and JOIN ON otherwise.

2. Find the total percentage of time assigned to employee Abe Advice. Solve it two ways:

A) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN) and 2) using some form of JOIN.

3. Find the descriptions of all projects that require more than 70% of an employees time. Solve it two ways:

A) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN)

B) using some form of JOIN.

4. For each employee ID, find the last name of all employees making more money than that employee. Solve it two ways:

A) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN)

B) using some form of JOIN.

5. Rank the projects by revenue. Solve it two ways:

A) using only WHERE-based join (i.e., no INNER/OUTER/CROSS JOIN)

B) using some form of JOIN.

For these exercises, we use the Employees Database presented in the other

Tools Donahoo-SQL P. x 24 Chapter 1: Databasics departments code projects projectid deptcodexname description startdate enddate managerid subdeptof T workson projectid revenue employeeidH assignedtime employees employeed firstname astname deplcode X salary Figure 1.5: Schema for the Employees Database

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!