Task: Text to Code
Input (English): Step 1: find the Rank of captain table for which captain's Class equals Cutter.
Step 2: For each row in Ship table, find the corresponding rows in captain table.
Step 3: find Rank of the results of step 2 whose Type equals Armed schooner.
Step 4: show the rows that are in both the results of step 1 and the results of step 3
Output (English): SELECT T1.Rank FROM captain AS T1 WHERE T1.Class = "Cutter" INTERSECT SELECT T1.Rank FROM captain AS T1 JOIN Ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Type = "Armed schooner"