Task: Text to Code
Input (English): Step 1: For each row in Documents table, find corresponding rows in Ref_Shipping_Agents table and in Documents_Mailed table.
Step 2: find shipping_agent_name of the results of step 1 whose Documents_Mailed's document_id equals 2
Output (English): SELECT T1.shipping_agent_name FROM Ref_Shipping_Agents AS T1 JOIN Documents AS T2 ON T1.shipping_agent_code = T2.shipping_agent_code JOIN Documents_Mailed AS T3 ON T2.document_id = T3.document_id WHERE T3.document_id = 2