You are not supposed to use any aggregation functions such


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: You are not supposed to use any aggregation functions such
Reference No:- TGS02759970

Now Priced at $10 (50% Discount)

Recommended (98%)

Rated (4.3/5)