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
which states have a river
assistant
SELECT traverse FROM river;
human
what river flows through the most states
assistant
SELECT river_name FROM river GROUP BY ( river_name ) ORDER BY COUNT ( DISTINCT traverse ) DESC LIMIT 1;
human
which states do ohio river flow through
assistant
SELECT traverse FROM river WHERE river_name = 'ohio';
human
how many major rivers cross ohio
assistant
SELECT COUNT ( river_name ) FROM river WHERE LENGTH > 750 AND traverse = 'ohio';
human
name the major rivers in illinois
assistant
SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = 'illinois';
human
what is the river that cross over illinois
assistant
SELECT river_name FROM river WHERE traverse = "illinois" ;