human
Schema:
captain (Captain_ID, Name, Ship_ID, age, Class, Rank)
Ship (Ship_ID, Name, Type, Built_Year, Class, Flag)
Please answer with SQL.
assistant
Sure, I understand.
human
Who are the captains? | Do you mean you want the name of captain? | Yes, what are the captains names
assistant
SELECT t1.name FROM captain AS t1;
human
Who is the youngest captain?
assistant
SELECT t1.name FROM captain AS t1 ORDER BY t1.age LIMIT 1;
human
What ship does Captain Henry steer? | Do you mean the name of ships of Captain Henry? | Yes the name of the ship of Captain Henry
assistant
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.Name LIKE "%Henry%" ;