CREATE TABLE ship (ship_id DECIMAL, name TEXT, type TEXT, built_year DECIMAL, class TEXT, flag TEXT)
CREATE TABLE captain (captain_id DECIMAL, name TEXT, ship_id DECIMAL, age TEXT, class TEXT, rank TEXT)

What types of ships have both ships that have Panama Flags and Malta flags?
SELECT type FROM ship WHERE flag = 'Panama' INTERSECT SELECT type FROM ship WHERE flag = 'Malta'
SELECT "type" FROM "ship" WHERE "flag" = 'Panama' INTERSECT SELECT "type" FROM "ship" WHERE "flag" = 'Malta'