Database: geo
Question: what is the longest river in the states that border 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" );