Question: Write a query, such that for every ship that was sunk in a battle, the query returns the: name of the ship, the date when

Write a query, such that for every ship that was sunk ina battle, the query returns the: name of the ship, the dateWrite a query, such that for every ship that was sunk in a battle, the query returns the: name of the ship, the date when the ship was launched, the name of the battle where the ship was sunk, and the date of the battle. If the launch date is not known, that is the ship is not listed in the Ships relation, return the value "unknown" for the launch date.

mysql> SELECT FROM Classes | class | type | country numGuns bore displacement | | Bismarck | Iowa | Kongo | North Carolina | bb USIA | Renowrn | Revenge | Tennessee | Yamato 15 16 14 16 15 15 14 9 |18 42000 | 46000 I 32000 I 37000 I 32000 | 29000 | 32000 I 65000 I | bb Germany bb USA | bc Japan bc Gt. Britain | | bb Gt. Britain | | bb|USA | bb Japan 12 8 rows in set (0.00 sec) mysql> SELECT FROM Battles | name | date | Denmark Strait | 5/24-27/41 | | Guadalcanal 11/15/42I | North Cape | Surigao Strait | 10/25/44I | 12/26/43 I 4 rows in set (0.00 sec) mysql> SELECT FROM Outcomes; I ship | battle | result |I | Arizona | Bismarck | California | Duke of YorkNorth Cape | Pearl HarborsunkI | Denmark Strait | sunk | Surigao Strait | ok ok Fuso | Hood | King George VDenmark Strait | ok | Kirishima | Prince of Wales | Denmark Strait | damaged | | Rodney | Scharnhorst | South Dakota Guadalcana ok l Tennessee | Washington | West Virginia Surigao Strait | ok | Yamashiro | Surigao Strait | sunkI | Denmark Strait | sunkI | Guadalcanal sunk I | Denmark Strait | ok | North Cape sunk | Surigao Strait | ok | Guadalcanal ok | Surigao Strait | sunk| 16 rows in set (0.00 sec)

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!