Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2: SQL (40 points) Use the following database to answer all parts of this question Table: EMP Primary Key: E NO E NO E

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Question 2: SQL (40 points) Use the following database to answer all parts of this question Table: EMP Primary Key: E NO E NO E NAME E RATE $400.00 $200.00 $150.00 $150.00 $120.00 $100.00 $100.00 $50.00 E DEPT 10 $50.00 150.00 Table: PART Primary Key: P NO P NO P CITY P1 P2 P3 P4 PS P6 NY LA LA Table: PROJECT Primary Key: PR NO PR NO PR MGR PR DEPT PR LOC NY LA NY Table: SUPPLIER Primary Key: S NO S NO S NAME S1 S2 S3 NY LA Table: SUPPLY Primary Key: P NO+ PR NO+ S_NO Foreign Key: P_NO references PART Foreign Key: PR NO references PROJECT Foreign Key: S NO references SUPPLIER P NO PR NO S NO 112 113 121 122 123 131 132 133 211 311 411 511 611 Table: WORK Primary Key: E_NO+ PR NO Foreign Key: E NO references EMP Foreign Key: PR_NO references PROJECT E NO PR NO 10 20 20 20 20 10 10 For questions 1 thru 4 show the Queries and the results. (All parts carry equal points). Use the same table names, field names, and data as presented above. Questions: 1. Compute the amount to be billed to each project as "Amount". The amount for each project is computed as the sum of the amount billed to the project by all employess working on the project. The amount billed by an employee to a project is obtained as the product the hours (HRS) that the employee devotes to the project and the billing rate (E_RATE) for the employee. Compute the total revenue generated by each department as "Revenue". The Revenue for each department is computed as the sum of the amount billed to all projects controlled by the department. (Note that the PR_DEPT for a project represents the controlling department for the project). 2. 3. List the names of employees who only work in projects located (PR LOC) in New York (NY) 4. List the name of employees who work on all projects

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Google Analytics 4 The Data Driven Marketing Revolution

Authors: Galen Poll

2024th Edition

B0CRK92F5F, 979-8873956234

More Books

Students also viewed these Databases questions

Question

3. Are our bosses always right? If not, what should we do?

Answered: 1 week ago

Question

Name and describe Diana Baumrinds three parenting styles.

Answered: 1 week ago

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago