What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?
return ships ;return captains  that  #1 are commanded by ;return ranks of   #2 ;return #1 where at least one #3 is  Midshipman ;return #1 where at least one #3 is  Lieutenant ;return #1 in both #4 and #5
['select', 'project', 'project', 'comparative', 'comparative', 'intersection']