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 do not have rivers
assistant
SELECT COUNT ( DISTINCT state_name ) FROM state WHERE state_name NOT IN ( SELECT traverse FROM river );
human
which states have a river
assistant
SELECT traverse FROM river;
human
what are the major rivers in the us
assistant
SELECT river_name FROM river;
human
what states contain at least one major rivers
assistant
SELECT traverse FROM river WHERE LENGTH > 750;
human
how many states have major rivers
assistant
SELECT COUNT ( traverse ) FROM river WHERE LENGTH > 750;
human
how many states are next to major rivers
assistant
SELECT COUNT( DISTINCT traverse ) FROM river WHERE LENGTH > 750 ;