For each crew if the crew is allergic to no flowers that


Given the relational tables as follows:

SHIP(Shipname, Captain)

CREW(Crewname, Hometown, Shipname)

GROWS(Hometown, Flower)

ALLERGIES(Crewname, Flower)

Please use SQL statement to construct the following queries:

(You are not supposed to use any aggregation functions such as count(), sum(), etc.; you are assumed that you do not know the data values of Shipname, Captain, Crewname, Hometown, Flower, etc. in the database table when you query the database table).

a. For each crew, if the crew is allergic to no flowers that grow on his/her hometown, then list the crew's name.

b. For each crew, if the crew is allergic to all flowers that grow on his/her hometown, then list the crew's name.

c. For each crew, if the crew is allergic only to the flowers that grow on their hometown, then list the crew's name.

d. For each crew, if the crew is allergic to exactly the same flowers that his/her captain is allergic to, then list the crew's name.

Solution Preview :

Prepared by a verified Expert
Business Management: For each crew if the crew is allergic to no flowers that
Reference No:- TGS02766229

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)