human
Schema:
state (state_name, population, area, country_name, capital, density)
city (city_name, population, country_name, state_name)
border_info (state_name, border)
highlow (state_name, highest_elevation, lowest_point, highest_point, lowest_elevation)
lake (lake_name, area, country_name, state_name)
mountain (mountain_name, mountain_altitude, country_name, state_name)
river (river_name, length, country_name, traverse)
Please answer with SQL.
assistant
Sure, I understand.
human
what state bordering oklahoma has the largest population
assistant
SELECT state_name FROM state WHERE state_name IN ( SELECT border FROM border_info WHERE state_name = 'oklahoma' ) ORDER BY population DESC LIMIT 1;
human
how many states are in the usa
assistant
SELECT COUNT ( state_name ) FROM state;
human
what states have no bordering state
assistant
SELECT state_name FROM state WHERE state_name NOT IN ( SELECT state_name FROM border_info );
human
how many states border at least one other state
assistant
SELECT COUNT ( DISTINCT state_name ) FROM border_info;
human
what states neighbor kentucky
assistant
SELECT border FROM border_info WHERE state_name = 'kentucky';
human
what is the number of neighboring states for kentucky
assistant
SELECT COUNT( border ) FROM border_info WHERE state_name = "kentucky" ;