Question: Query # 1 a: Using the NATURAL JOIN condition, retrieve the name of the department, the name of the project, and the location of the

Query #1a: Using the NATURAL JOIN condition, retrieve the name of the department, the name of the project, and the location of the project for the ProductY project.
Query #1b: Using the NATURAL JOIN condition, retrieve the name of the department, the name of the project, and the location of the project for the ProductY project. Combine this query result with one that retrieves the name of the department, the name of the project, and the location of the project that Alicia works on.
Query #2: Using LEFT OUTER JOIN between DEPARTMENT and EMPLOYEE tables list the first and last names of employees who manage a department.
Query #3: Using the MINUS condition, write a query that retrieves the name of the department, the name of the project, and the location of projects that Franklin does not work in.
Query #4: Using the INTERSECT condition, write a query that retrieves the name of the department, the name of the project, and the location of the projects that Franklin works in.(Hint: Query #3 and Query #4 differ by the keyword)
Query #5: Write a query that retrieves the number of projects each employee works on. Show each employee's first and last names alongside the number of projects each employee works on. Present the list ordered alphabetically by the first name.
CREATETABLESHOW(
SHOW_IDINTPRIMARYKEY,
SHOW_NAMEVARCHAR(20)NOTNULL,
SHOW_GENREVARCHAR(20)
);
CREATETABLEANCHOR(
ANCHOR_IDINTPRIMARYKEY,
FIRST_NAMEVARCHAR(20)NOTNULL,
LAST_NAMEVARCHAR(20)NOTNULL,
EMAIL_ADDRESSVARCHAR(100),
PHONE_NUMBERVARCHAR(12)
);
CREATETABLESTUDIO(
STUDIO_IDINTPRIMARYKEY,
STUDIO_CITYVARCHAR(20),
STUDIO_NAMEVARCHAR(20)
);
CREATETABLEBROADCAST(
BROADCAST_IDINTPRIMARYKEY,
BROADCAST_TITLEVARCHAR(255),
BROADCAST_DATEDATENOTNULL,
START_TIMETIMESTAMPNOTNULL,
END_TIMETIMESTAMPNOTNULL,
STUDIO_IDINTNOTNULL,
SHOW_IDINTNOTNULL,
CONSTRAINTBR_SH_FKFOREIGNKEY(SHOW_ID)REFERENCESSHOW(SHOW_ID),
CONSTRAINTBR_ST_FKFOREIGNKEY(STUDIO_ID)REFERENCESSTUDIO(STUDIO_ID)
);
CREATETABLEANCHOR_ASSIGNMENTS(
ANCHOR_IDINTNOTNULL,
BROADCAST_IDINTNOTNULL,
CONSTRAINTAA_PKPRIMARYKEY(ANCHOR_ID,BROADCAST_ID),
CONSTRAINTAA_A_FKFOREIGNKEY(ANCHOR_ID)REFERENCESANCHOR(ANCHOR_ID),
CONSTRAINTAA_BC_FKFOREIGNKEY(BROADCAST_ID)REFERENCESBROADCAST(BROADCAST_ID)
);
--PopulateANCHORtable
INSERTINTOANCHOR(ANCHOR_ID,FIRST_NAME,LAST_NAME,EMAIL_ADDRESS,PHONE_NUMBER)
VALUES
(13,'KURT','WARNER','kurt.warner@nfl.com','890-013-7890'),
(112,'MARSHAWN','LYNCH','marshawn.lynch@nfl.com','890-456-7890');
--PopulateSHOWtable
INSERTINTOSHOW(SHOW_ID,SHOW_NAME,SHOW_GENRE)
VALUES(10,'NFLNETWORK','SPORTS');
--PopulateSTUDIOtable
INSERTINTOSTUDIO<

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 Programming Questions!