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
how many states have major rivers
assistant
SELECT COUNT ( traverse ) FROM river WHERE LENGTH > 750;
human
how many rivers are there in us
assistant
SELECT COUNT ( river_name ) FROM river;
human
which state has the lowest point that borders idaho
assistant
SELECT state_name FROM highlow WHERE lowest_elevation = ( SELECT MIN ( lowest_elevation ) FROM highlow WHERE state_name IN ( SELECT border FROM border_info WHERE state_name = 'idaho' ) ) AND state_name IN ( SELECT border FROM border_info WHERE state_name = 'idaho' );
human
what states contain at least one major rivers
assistant
SELECT traverse FROM river WHERE LENGTH > 750;
human
how many colorado rivers are there
assistant
SELECT COUNT ( river_name ) FROM river WHERE river_name = 'colorado';
human
how many rivers are found in idaho
assistant
SELECT COUNT( river_name ) FROM river WHERE traverse = "idaho" ;