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
What is the most recent build year?
assistant
SELECT MAX( built_year ) FROM ship;
human
Which ships were built in the most recent year?
assistant
SELECT name FROM ship WHERE built_year IN ( SELECT MAX( built_year ) FROM ship );
human
Also give the type and flag.
assistant
SELECT name , type , flag FROM ship WHERE built_year IN ( SELECT MAX( built_year ) FROM ship ) ;