question
stringlengths
3
224
db
stringclasses
166 values
query
stringlengths
18
577
db_schema
stringclasses
166 values
what is the high point of texas
geo
SELECT highest_point FROM highlow WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the highest mountain in texas
geo
SELECT highest_point FROM highlow WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
could you tell me what is the highest point in the state of texas
geo
SELECT highest_point FROM highlow WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what states have no bordering state
geo
SELECT state_name FROM state WHERE state_name NOT IN ( SELECT state_name FROM border_info );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
name the states which have no surrounding states
geo
SELECT state_name FROM state WHERE state_name NOT IN ( SELECT state_name FROM border_info );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
which states border no other states
geo
SELECT state_name FROM state WHERE state_name NOT IN ( SELECT state_name FROM border_info );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the area of the state with the smallest population density
geo
SELECT area FROM state WHERE density = ( SELECT MIN ( density ) FROM state );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
count the states which have elevations lower than what alabama has
geo
SELECT COUNT ( state_name ) FROM highlow WHERE lowest_elevation < ( SELECT lowest_elevation FROM highlow WHERE state_name = "alabama" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how high is guadalupe peak
geo
SELECT highest_elevation FROM highlow WHERE highest_point = "guadalupe peak";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how tall is guadalupe peak
geo
SELECT highest_elevation FROM highlow WHERE highest_point = "guadalupe peak";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the maximum elevation of guadalupe peak
geo
SELECT highest_elevation FROM highlow WHERE highest_point = "guadalupe peak";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how high is the highest point in america
geo
SELECT MAX ( highest_elevation ) FROM highlow;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the highest elevation in the united states
geo
SELECT MAX ( highest_elevation ) FROM highlow;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the elevation of the highest point in the usa
geo
SELECT MAX ( highest_elevation ) FROM highlow;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the height of the highest point in the usa
geo
SELECT MAX ( highest_elevation ) FROM highlow;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how long is the rio grande river
geo
SELECT length FROM river WHERE river_name = "rio grande";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the length of the rio grande river
geo
SELECT length FROM river WHERE river_name = "rio grande";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what length is the rio grande
geo
SELECT length FROM river WHERE river_name = "rio grande";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how long is the rio grande
geo
SELECT length FROM river WHERE river_name = "rio grande";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how long is the rio grande river in miles
geo
SELECT length FROM river WHERE river_name = "rio grande";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how long is rio grande
geo
SELECT length FROM river WHERE river_name = "rio grande";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how long is the longest river in texas
geo
SELECT length FROM river WHERE length = ( SELECT MAX ( length ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the length of the longest river that runs through texas
geo
SELECT length FROM river WHERE length = ( SELECT MAX ( length ) FROM river WHERE traverse = "texas" ) AND traverse = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many capitals does rhode island have
geo
SELECT COUNT ( capital ) FROM state WHERE state_name = "rhode island";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many cities are there in the united states
geo
SELECT COUNT ( city_name ) FROM city;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many cities does the usa have
geo
SELECT COUNT ( city_name ) FROM city;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many cities are there in the us
geo
SELECT COUNT ( city_name ) FROM city;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many cities are there in usa
geo
SELECT COUNT ( city_name ) FROM city;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many cities are there in us
geo
SELECT COUNT ( city_name ) FROM city;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many major cities are there
geo
SELECT COUNT ( city_name ) FROM city WHERE population > 150000;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many citizens does the biggest city have in the usa
geo
SELECT population FROM city WHERE population = ( SELECT MAX ( population ) FROM city );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many colorado rivers are there
geo
SELECT COUNT ( river_name ) FROM river WHERE river_name = "colorado";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many rivers are called colorado
geo
SELECT COUNT ( river_name ) FROM river WHERE river_name = "colorado";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the population of seattle washington
geo
SELECT population FROM city WHERE city_name = "seattle" AND state_name = "washington";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many people live in seattle washington
geo
SELECT population FROM city WHERE city_name = "seattle" AND state_name = "washington";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many people live in the biggest city in alaska state
geo
SELECT population FROM city WHERE population = ( SELECT MAX ( population ) FROM city WHERE state_name = "alaska" ) AND state_name = "alaska";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how large is the largest city in alaska
geo
SELECT population FROM city WHERE population = ( SELECT MAX ( population ) FROM city WHERE state_name = "alaska" ) AND state_name = "alaska";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many people live in the capital of texas
geo
SELECT population FROM city WHERE city_name = ( SELECT capital FROM state WHERE state_name = "texas" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the size of the capital of texas
geo
SELECT population FROM city WHERE city_name = ( SELECT capital FROM state WHERE state_name = "texas" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many people live in the united states
geo
SELECT SUM ( population ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the combined population of all 50 states
geo
SELECT SUM ( population ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states are in the usa
geo
SELECT COUNT ( state_name ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states are there
geo
SELECT COUNT ( state_name ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states are there in the usa
geo
SELECT COUNT ( state_name ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states does usa have
geo
SELECT COUNT ( state_name ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states are in the united states
geo
SELECT COUNT ( state_name ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states are there in united states
geo
SELECT COUNT ( state_name ) FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states border kentucky
geo
SELECT COUNT ( border ) FROM border_info WHERE state_name = "kentucky";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states does kentucky border
geo
SELECT COUNT ( border ) FROM border_info WHERE state_name = "kentucky";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
kentucky borders how many states
geo
SELECT COUNT ( border ) FROM border_info WHERE state_name = "kentucky";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
number of states bordering kentucky
geo
SELECT COUNT ( border ) FROM border_info WHERE state_name = "kentucky";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the number of neighboring states for kentucky
geo
SELECT COUNT ( border ) FROM border_info WHERE state_name = "kentucky";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states border the state with the largest population
geo
SELECT COUNT ( border ) FROM border_info WHERE state_name IN ( SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state ) );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states do not have rivers
geo
SELECT COUNT ( DISTINCT state_name ) FROM state WHERE state_name NOT IN ( SELECT traverse FROM river );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
how many states have a higher point than the highest point of the state with the largest capital city in the us
geo
SELECT COUNT ( state_name ) FROM highlow WHERE highest_elevation > ( SELECT highest_elevation FROM highlow WHERE state_name = ( SELECT state_name FROM state WHERE capital = ( SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city ) ) ) );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
name the major rivers in illinois
geo
SELECT river_name FROM river WHERE length > 750 AND traverse = "illinois";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major rivers in illinois
geo
SELECT river_name FROM river WHERE length > 750 AND traverse = "illinois";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are major rivers in illinois
geo
SELECT river_name FROM river WHERE length > 750 AND traverse = "illinois";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what major rivers run through illinois
geo
SELECT river_name FROM river WHERE length > 750 AND traverse = "illinois";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
through which states does the longest river in texas run
geo
SELECT traverse FROM river WHERE length = ( SELECT MAX ( length ) FROM river WHERE traverse = "texas" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the capital city in texas
geo
SELECT capital FROM state WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the capital of texas
geo
SELECT capital FROM state WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the capital of the texas state
geo
SELECT capital FROM state WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is capital of texas
geo
SELECT capital FROM state WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the capital of the state texas
geo
SELECT capital FROM state WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
can you tell me the capital of texas
geo
SELECT capital FROM state WHERE state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the capitals of states that border texas
geo
SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the capital cities of the states which border texas
geo
SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the capitals of the states that border texas
geo
SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
which capitals are in the states that border texas
geo
SELECT t2.capital FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the cities in states through which the mississippi runs
geo
SELECT city_name FROM city WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the cities of the state with the highest point
geo
SELECT city_name FROM city WHERE state_name IN ( SELECT state_name FROM highlow WHERE highest_elevation = ( SELECT MAX ( highest_elevation ) FROM highlow ) );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the highest points of all the states
geo
SELECT highest_point FROM highlow;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities in kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities in the state of kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what major cities are located in kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
show major cities in kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the names of the major cities in kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities of kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the major cities in kansas
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name = "kansas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities in states through which the mississippi runs
geo
SELECT city_name FROM city WHERE population > 150000 AND state_name IN ( SELECT traverse FROM river WHERE length > 750 AND river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities in the usa
geo
SELECT city_name FROM city WHERE population > 150000;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities of the united states
geo
SELECT city_name FROM city WHERE population > 150000;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the major cities of the us
geo
SELECT city_name FROM city WHERE population > 150000;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the population densities of each us state
geo
SELECT density FROM state;
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of states through which the mississippi river run
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of states through which the mississippi runs
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of the states through which the mississippi runs
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of states through which the mississippi river runs
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of the states through which the mississippi run
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of the states through which the mississippi river run
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of states through which the mississippi run
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of the states through which the mississippi river runs
geo
SELECT population FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of states which border texas
geo
SELECT t2.population FROM state AS t2 JOIN border_info AS t1 ON t2.state_name = t1.border WHERE t1.state_name = "texas";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of the major cities of wisconsin
geo
SELECT population FROM city WHERE population > 150000 AND state_name = "wisconsin";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what are the populations of all the major cities in wisconsin
geo
SELECT population FROM city WHERE population > 150000 AND state_name = "wisconsin";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the population of the major cities in wisconsin
geo
SELECT population FROM city WHERE population > 150000 AND state_name = "wisconsin";
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what city has the most people
geo
SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what city in the united states has the highest population density
geo
SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )
what is the most populous city
geo
SELECT city_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city );
CREATE SCHEMA public; CREATE SCHEMA prod; CREATE SCHEMA dev; CREATE TABLE public.border_info( state_name TEXT, border TEXT, PRIMARY KEY (state_name), FOREIGN KEY (border) REFERENCES prod.state(state_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE public.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 prod.state(state_name) ) CREATE TABLE public.lake( lake_name TEXT, area DOUBLE, country_name VARCHAR(3), state_name TEXT ) CREATE TABLE public.river( river_name TEXT, length INTEGER, country_name VARCHAR(3), traverse TEXT, PRIMARY KEY (river_name), FOREIGN KEY (traverse) REFERENCES prod.state(state_name) ) CREATE TABLE prod.mountain( mountain_name TEXT, mountain_altitude INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (mountain_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) ) CREATE TABLE prod.state( state_name TEXT, population INTEGER, area DOUBLE, country_name VARCHAR(3), capital TEXT, density DOUBLE, PRIMARY KEY (state_name) ) CREATE TABLE dev.city( city_name TEXT, population INTEGER, country_name VARCHAR(3), state_name TEXT, PRIMARY KEY (city_name), FOREIGN KEY (state_name) REFERENCES prod.state(state_name) )