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
give me the cities in texas
assistant
SELECT city_name FROM city WHERE state_name = 'texas';
human
what is the population of the largest state that borders texas
assistant
SELECT population FROM state WHERE area = ( SELECT MAX ( area ) FROM state WHERE state_name IN ( SELECT border FROM border_info WHERE state_name = 'texas' ) ) AND state_name IN ( SELECT border FROM border_info WHERE state_name = 'texas' );
human
how many people live in the capital of texas
assistant
SELECT population FROM city WHERE city_name = ( SELECT capital FROM state WHERE state_name = 'texas' );
human
what are the capital city in texas
assistant
SELECT capital FROM state WHERE state_name = 'texas';
human
how many cities are in texas
assistant
SELECT COUNT ( city_name ) FROM city WHERE state_name = 'texas';
human
how many big cities are in texas
assistant
SELECT COUNT( city_name ) FROM city WHERE population > 150000 AND state_name = "texas" ;