Question: Use 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

Use 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)

All relations are defined as tables in the database.

1. Which battleships launched before 1942 had 16 inch guns? List their names, their country, and the number of guns they carried.

2. Which battleships had the guns with the largest gun size?

3. Which battleships had the guns with the second largest gun size. More precisely, find the ships whose gun size was exceeded by only one gun size, no matter how many other ships had that larger gun size. List the names of the ships and their gun size.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!