Context: CREATE TABLE Documents (Id VARCHAR); CREATE TABLE Ref_Shipping_Agents (Id VARCHAR)
Question: What is the name of the shipping agent of the document with id 2?
Answer: SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2