Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using these already created tables in a database, write Microsoft SQL Server compatible SQL queries to answer each question. No written response needed, just the

image text in transcribedimage text in transcribed

Using these already created tables in a database, write Microsoft SQL Server compatible SQL queries to answer each question. No written response needed, just the SQL code that answers the question.

A. What projects are in the PROJECT table? Show all information for each project.

B. What are the ProjectID, ProjectName, StartDate, and EndDate values of projects in the PROJECT table?

C. What projects in the PROJECT table started before August 1, 2014? Show all the information for each project.

D. What projects in the PROJECT table have not been completed? Show all the information for each project.

E. Who are the employees assigned to each project? Show ProjectID, EmployeeNumber, LastName, FirstName, and Phone.

F. Who are the employees assigned to each project? Show ProjectID, ProjectName, and Department. Show EmployeeNumber, LastName, FirstName, and Phone.

G. Who are the employees assigned to each project? Show ProjectID, ProjectName, Department, and Department Phone. Show EmployeeNumber, LastName, FirstName, and Employee Phone. Sort by ProjectID, in ascending order.

H. Who are the employees assigned to projects run by the marketing department? Show ProjectID, ProjectName, Department, and Department Phone. Show EmployeeNumber, LastName, FirstName, and Employee Phone. Sort by ProjectID, in ascending order.

I. How many projects are being run by the marketing department? Be sure to assign an appropriate column name to the computed results.

J. What is the total MaxHours of projects being run by the marketing department? Be sure to assign an appropriate column name to the computed results.

K. What is the average MaxHours of projects being run by the marketing department? Be sure to assign an appropriate column name to the computed results.

L. How many projects are being run by each department? Be sure to display each DepartmentName and to assign an appropriate column name to the computed results.

DEPARTMENT: DepartmentName BudgetCode Office Number Phone 1 Accounting BC-300-10 BLDG01-100 360-285-8300 Administration BC-100-10 BLDG01-300 360-285-8100 BLDG01-140 360-285-8400 Finance BC-400-10 Human Resources BC-500-10 BLDG 01-180 360-285-8500 InfoSystems BC-800-10 BLDG02-270 360-287-8800 6 Legal BC-200-10 BLDG 01-200 360-285-8200 7 BC-700-10 BLDG02-200 360-287-8700 Marketing Production BC-600-10 BLDG 02-100 360-287-8600 EMPLOYEE Employee Number First Na Last Name Department Phone Emani Mary Jacobs Administration 360-285-8110 Mary Jacobs@WPC.com Rosalie Jackson Administration 360-285-8120 Rosalie. Jackson@WPC.com 3 Richard Bandalone Legal 360-285-8210 Richard Bandalone @WPC-com Tom Caruthers Accounting 360-285-8310 Tom. Caruthers@WPC.com Heather Jones Accounting 360-285-8320 Heather Jones@WPC.com Mary Abernathy Finance 360-285-8410 Mary..Abernathy@WPC.com George Smith Human Resources 360-285-8510 George Smith@WPC.com Tom Jackson Production 360-287-8610 Tom Jackson@WPC.com George Jones Production 360-287-8620 George Jones@WPC.com 10 10 Ken Numoto Marketing 360-287-8710 Ken Mumoto@WPC.com James Nestor InfoSystems NULL WPC com 11 James Nestor 11 Rick Brown Infosystems 12 360-287-8820 Rick Brown@WPC.com 12

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_2

Step: 3

blur-text-image_3

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago

Question

Determine the roles of spatial layout and functionality.

Answered: 1 week ago