Question: 1 . Using the MINUS condition, write a query that retrieves the name of the department, the name of the project, and the location of

1.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.
2.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 #1 and Query #2 differ by the keyword)
3.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!