Which type of ship has flag Panama?
select distinct type from ship where flag = 'Panama'
How about Malta?
select type from ship where flag = 'Malta'
Which types have ships with both flags?
select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'