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 are the names of all ships?
assistant
SELECT name FROM ship;
human
And what about all the classes?
assistant
SELECT class FROM ship;
human
Can I see list of names and classes of ships that don't have any captain?
assistant
SELECT name , CLASS FROM ship WHERE ship_id NOT IN ( SELECT ship_id FROM captain ) ;