Question: SQL Asslgnment The shema of these relations is: CLASSES(class, type, country, numguns, bore, displacement) SHIPS (name, class, launched) BATTLES (name. date) OUTCOMES (ship, battle, result)

SQL Asslgnment The shema of these relations is: CLASSES(class, type, country, numguns, bore, displacement) SHIPS (name, class, launched) BATTLES (name. date) OUTCOMES (ship, battle, result) Ships are built in "classes" from the same design, and the class is usually named for the first ship of that class. The relation Classes records the name of the class, the type(bb' for battleship or 'bc' for battlecruiser), the country that build the ship, the number of main guns, the bore (diameter of the gun), and the displacement(weight, in tons). Relation Ships records the name of the ship, the name of its class, and the year in which the ship was launched. Relation Battles gives the name and date of battles involving these ships, and relation Outcomes gives the result (sunk, damaged, or ok) for each in each battle The Assignment write the necessary sql queries for the folowing tasks. 1. The average bore of battleship classes (type- bb') 2. The average bore of all battleships (type- bb), and their total number of guns. This 3. 4. average should be different from the 1st query, why? The number of ships involved in each battle. The number of battles in which each ship participated, if more than 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
