what are the names and classes of the ships that do not have any captain yet?
select name, class from ship where ship_id not in ( select ship_id from captain )
What are the names of the captains that have classes?
select name from captain where class ! = 'NULL'
yes
select ship_id from ship where name = "HMS Gorgon"
yes
select count ( distinct class ) from ship
What is HMS Gorgon's rank?
select t1.rank from captain as t1 join ship as t2 on t1.ship_id = t2.ship_id where t2.name = "HMS Gorgon"