human
Schema:
state (state_name, population, area, country_name, capital, density)
city (city_name, population, country_name, state_name)
border_info (state_name, border)
highlow (state_name, highest_elevation, lowest_point, highest_point, lowest_elevation)
lake (lake_name, area, country_name, state_name)
mountain (mountain_name, mountain_altitude, country_name, state_name)
river (river_name, length, country_name, traverse)
Please answer with SQL.
assistant
Sure, I understand.
human
what is the capital of the largest state
assistant
SELECT capital FROM state WHERE area = ( SELECT MAX ( area ) FROM state );
human
what state has the largest capital
assistant
SELECT state_name FROM city WHERE population = ( SELECT MAX ( t1.population ) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name );
human
name the 50 capitals in the usa
assistant
SELECT DISTINCT capital FROM state;
human
what is the biggest capital city in the us
assistant
SELECT city_name FROM city WHERE population = ( SELECT MAX ( t1.population ) FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name );
human
how many major cities are there
assistant
SELECT COUNT ( city_name ) FROM city WHERE population > 150000;
human
which capitals are not major cities
assistant
SELECT t2.capital FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name WHERE t1.population <= 150000 ;