spider_version
int64
1
2
db_id
stringclasses
204 values
schema
stringclasses
187 values
question
stringlengths
3
328
query
stringlengths
20
3.81k
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what cities are located in texas
SELECT city_name FROM city WHERE state_name = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the cities in texas
SELECT city_name FROM city WHERE state_name = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what cities in texas
SELECT city_name FROM city WHERE state_name = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
give me the cities which are in texas
SELECT city_name FROM city WHERE state_name = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the area of the state with the capital albany
SELECT area FROM state WHERE capital = "albany";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
give me the lakes in california
SELECT lake_name FROM lake WHERE state_name = "california";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
name the major lakes in michigan
SELECT lake_name FROM lake WHERE area > 750 AND state_name = "michigan";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the states
SELECT state_name FROM state;
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
list the states
SELECT state_name FROM state;
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
give me all the states of usa
SELECT state_name FROM state;
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states do ohio river flow through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states does the ohio river run through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states border the ohio river
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states border the ohio river
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states does the ohio run through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
where is the ohio river
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states does the ohio river run through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states does the ohio run through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states does the ohio river pass through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the states that the ohio run through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state has the ohio river
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states have rivers named ohio
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
through which states does the ohio flow
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states are next to the ohio
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
through which states does the ohio run
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states does the ohio river go through
SELECT traverse FROM river WHERE river_name = "ohio";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state has the largest population
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the most populous state
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state is the largest in population
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state has the biggest population
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state has the greatest population
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state has the most population
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state has the most people
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state has the most people
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the most populous state in the us
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state has the highest population
SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the lowest elevation in pennsylvania
SELECT lowest_elevation FROM highlow WHERE state_name = "pennsylvania";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the highest point in each state whose lowest point is sea level
SELECT highest_point , state_name FROM highlow WHERE lowest_elevation = 0;
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the length of the longest river in the usa
SELECT LENGTH FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how long is the longest river in the usa
SELECT LENGTH FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the longest river flowing through texas
SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the largest river in texas state
SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the longest river in texas
SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the biggest river in texas
SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the longest river that flows through texas
SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the biggest rivers in texas
SELECT river_name FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many rivers are in idaho
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
give me the number of rivers in idaho
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many rivers does idaho have
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many rivers are there in idaho
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many rivers run through idaho
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many rivers are found in idaho
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many rivers in idaho
SELECT COUNT ( river_name ) FROM river WHERE traverse = "idaho";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states neighbor kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states border kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states border kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
give me the states that border kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state borders kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states are next to kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states surround kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state borders kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the neighboring states for kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states adjoin kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
states bordering kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state border kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the adjacent state of kentucky
SELECT border FROM border_info WHERE state_name = "kentucky";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
name all the rivers in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
rivers in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are all the rivers in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the rivers in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what rivers are in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what rivers are there in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what rivers run through illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what rivers flow through illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what river flows through illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the rivers in the state of illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
name the rivers in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what are the rivers of illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which rivers are in illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which rivers flow through illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the river that cross over illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what river runs through illinois
SELECT river_name FROM river WHERE traverse = "illinois";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state is springfield in
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
where is springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
springfield is in what state
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states have cities named springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which states have cities named springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state is springfield in
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states have a city named springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state has the city springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states have towns named springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what state is springfield located in
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
in which state is springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
which state is the city springfield located in
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what states in the united states have a city of springfield
SELECT state_name FROM city WHERE city_name = "springfield";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the population of the state with the largest area
SELECT population FROM state WHERE area = ( SELECT MAX ( area ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the population of the largest state
SELECT population FROM state WHERE area = ( SELECT MAX ( area ) FROM state );
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many people live in boulder
SELECT population FROM city WHERE city_name = "boulder";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
what is the population of boulder
SELECT population FROM city WHERE city_name = "boulder";
1
geo
CREATE TABLE `state` ( `state_name` text , `population` integer DEFAULT NULL , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `capital` text , `density` DOUBLE DEFAULT NULL , PRIMARY KEY (`state_name`) ); CREATE TABLE `city` ( `city_name` text , `population` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`city_name`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `border_info` ( `state_name` text , `border` text , PRIMARY KEY (`border`,`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) , FOREIGN KEY(`border`) REFERENCES `state`(`state_name`) ); CREATE TABLE `highlow` ( `state_name` text , `highest_elevation` text , `lowest_point` text , `highest_point` text , `lowest_elevation` text , PRIMARY KEY (`state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `lake` ( `lake_name` text , `area` DOUBLE DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text ); CREATE TABLE `mountain` ( `mountain_name` text , `mountain_altitude` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `state_name` text , PRIMARY KEY (`mountain_name`, `state_name`) , FOREIGN KEY(`state_name`) REFERENCES `state`(`state_name`) ); CREATE TABLE `river` ( `river_name` text , `length` integer DEFAULT NULL , `country_name` varchar(3) NOT NULL DEFAULT '' , `traverse` text , PRIMARY KEY (`river_name`) , FOREIGN KEY(`traverse`) REFERENCES `state`(`state_name`) )
how many people lived in boulder
SELECT population FROM city WHERE city_name = "boulder";