Which ship ids are steered by captains with the Midshipman rank?
select distinct ship_id from captain where rank = 'Midshipman'
Which are not?
select ship_id from ship except select ship_id from captain where rank = 'Midshipman'
What are their names and flags?
select name, flag from ship where ship_id not in (select ship_id from captain where rank = 'Midshipman')