human
Schema:
mission (Mission_ID, Ship_ID, Code, Launched_Year, Location, Speed_knots, Fate)
ship (Ship_ID, Name, Type, Nationality, Tonnage)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the names of all ships from United States?
assistant
SELECT Name FROM ship WHERE Nationality = 'United States';
human
Show the names of all ships from United Kingdom?
assistant
SELECT Name FROM ship WHERE Nationality = 'United Kingdom';
human
What type of ship is the Corbridge ?
assistant
SELECT type FROM ship WHERE name = 'Corbridge';
human
What is the tonnage of the Corbridge ?
assistant
SELECT tonnage FROM ship WHERE name = 'Corbridge';
human
What is the name of the ship with 3146 tonnage ?
assistant
SELECT name FROM ship WHERE tonnage = '3146';
human
What is the name of the ship with the most tonnage ?
assistant
SELECT name FROM ship ORDER by tonnage desc LIMIT 1;
human
How many different types of ships are there ?
assistant
SELECT COUNT( distinct type ) FROM ship ;