Please use sql statement to construct the queries

Assignment Help Basic Computer Science
Reference no: EM131979330

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.

Reference no: EM131979330

Questions Cloud

Which equal opportunity law do you think is easiest to obey : Which equal opportunity law do you think is easiest to obey? Why? Provide at least one example.
Relationship set exists between entity sets advisor : A one-to-many relationship set exists between entity sets advisor and student.
What is the impact of these events on this year net income : If these errors are not discovered and corrected until sometime in the future, what is the impact of these events on this year's net income
What is the projects total nominal cash flow from assets : What is the projects total nominal cash flow from assets for each year?
Please use sql statement to construct the queries : For each crew, if the crew is allergic to no flowers that grow on his/her hometown, then list the crew's name.
Record the journal entries for the adjusting entry : Required: Record the journal entries for a) the adjusting entry at the 2013 year end assuming the balance sheet approach
Cumulative voting-how many shares should you purchase : Under majority voting, how many shares do you need to purchase? If Apple has cumulative voting, how many shares should you purchase?
Opportunity costs in addition to the price of gas : Taking into account his opportunity costs in addition to the price of gas?
Calculate the required rate of return for mudd enterprises : Calculate the required rate of return for Mudd Enterprises assuming that investors expect a 4.4% rate of inflation in the future.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Some of basic network topologies

What, exactly, is telecommunications, and how has it impacted you in either your personal or business life? What are the some of basic network topologies? What advantages are realized by converting analog signals to digital signals?

  Separation between design and implementation

Implement the wallet ADT that you defined in Assignment 1 using doubly linked list. A wallet is  we use to keep our money (paper notes). We want to develop an abstract data type called Wallet that can contain collection of Money.

  Write an equation to model the problem

a) Write an equation to model the problem. Let x represent the number of video game rentals.

  What will the value of discountamount be

Code a for loop that adds the integers that are multiples of 5 starting with 50 and ending with 5. Each time the sum is increased, print it on a line at the console. Be sure to declare and initialize any required variables.

  Perform the task of adding 1500 numbers stored

write a program segment that can be used to perform the task of adding 1500 numbers stored at consecutive memory locations starting at memory location 15000. The results should be stored in memory location 3000

  Prove that the length of the message is greater

In certain chat programs or messaging applications, there is a limit on the number of characters that you can send in a message.

  Compute price-output if firm-oligopolstic industry collude

If firms in an oligopolstic industry successfully collude and form a cartel, what price and output will result? Price lower than the competitive price and because there are only a few firms in the industry, less output than the competitive amount

  Algorithm-adjusting playout delay at starting of each talk

Let the adaptive playout delay algorithm. Demonstrate through the simple example which adjusting the playout delay at starting of each talk spurt results in compressing.

  Write a program to find the nth busalem number

write a program to find the nth BuSalem number. You must use functions.

  What is the probability that a flush occurs

If there are 13 cards in each of four suits in a deck used in the game and there are 5 cards in a hand, what is the probability that a flush occurs?

  Business and management scenario assignment

Business and Management Scenario assignment Write a 3- to 4-page paper addressing the following: Create the following components:

  What is the salt outlet temperature

The tube-wall will tolerate temperatures up to 600°C. Will the tubes survive start-up? What is the salt outlet temperature?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd