Database: geo
Question: what is the longest river that runs through a state that borders tennessee
SQL:
SELECT river_name FROM river WHERE LENGTH  =  ( SELECT MAX ( LENGTH ) FROM river WHERE traverse IN ( SELECT border FROM border_info WHERE state_name  =  "tennessee" ) ) AND traverse IN ( SELECT border FROM border_info WHERE state_name  =  "tennessee" );