Question: Create SQL queries to answer the following questions: The database schema is as follows: Ships(name, class, launched) Classes(class, type, country, numGuns, bore, displacement): 'bb' for
Create SQL queries to answer the following questions:
The database schema is as follows:
Ships(name, class, launched)
Classes(class, type, country, numGuns, bore, displacement): 'bb' for battleship and 'bc' for battlecruiser.
Battles(name, date)
Outcomes(ship, battle, result)
Question 1.
List, for each country, the average number of guns carried by their battleships.
Question 2.
List all the pairs of countries that fought each other in battles. List each pair only once, and list them with the country that comes first in alphabetical order first.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
