db_name
stringclasses 146
values | prompt
stringlengths 310
4.81k
|
|---|---|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many major rivers cross ohio
#
### SQL:
#
# SELECT COUNT ( river_name ) FROM river WHERE LENGTH > 750 AND traverse = "ohio";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what state has the shortest river
#
### SQL:
#
# SELECT DISTINCT traverse FROM river WHERE LENGTH = ( SELECT MIN ( DISTINCT LENGTH ) FROM river );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many states are next to major rivers
#
### SQL:
#
# SELECT COUNT ( DISTINCT traverse ) FROM river WHERE LENGTH > 750;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the height of mount mckinley
#
### SQL:
#
# SELECT mountain_altitude FROM mountain WHERE mountain_name = "mckinley";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what states does the shortest river run through
#
### SQL:
#
# SELECT traverse FROM river WHERE LENGTH = ( SELECT MIN ( LENGTH ) FROM river );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the highest point in the state with the smallest population
#
### SQL:
#
# SELECT t2.highest_point FROM state AS t1 JOIN highlow AS t2 ON t1.state_name = t2.state_name WHERE t1.state_name IN ( SELECT state_name FROM state WHERE population = ( SELECT MIN ( population ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# which rivers run through the state with the lowest elevation in the usa
#
### SQL:
#
# SELECT river_name FROM river WHERE traverse IN ( SELECT state_name FROM highlow WHERE lowest_elevation = ( SELECT MIN ( lowest_elevation ) FROM highlow ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what rivers run through the state with the lowest point in the usa
#
### SQL:
#
# SELECT river_name FROM river WHERE traverse IN ( SELECT state_name FROM highlow WHERE lowest_elevation = ( SELECT MIN ( lowest_elevation ) FROM highlow ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what mountains are in alaska
#
### SQL:
#
# SELECT mountain_name FROM mountain WHERE state_name = "alaska";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many states have major rivers
#
### SQL:
#
# SELECT COUNT ( traverse ) FROM river WHERE LENGTH > 750;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the smallest state through which the longest river runs
#
### SQL:
#
# SELECT state_name FROM state WHERE area = ( SELECT MIN ( area ) FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river ) ) ) AND state_name IN ( SELECT traverse FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the largest state traversed by the rio grande river
#
### SQL:
#
# SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "rio grande" ) ) AND state_name IN ( SELECT traverse FROM river WHERE river_name = "rio grande" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the largest of the state that the rio grande runs through
#
### SQL:
#
# SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "rio grande" ) ) AND state_name IN ( SELECT traverse FROM river WHERE river_name = "rio grande" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many rivers run through the states bordering colorado
#
### SQL:
#
# SELECT COUNT ( river_name ) FROM river WHERE traverse IN ( SELECT border FROM border_info WHERE state_name = "colorado" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what state has no rivers
#
### SQL:
#
# SELECT state_name FROM state WHERE state_name NOT IN ( SELECT traverse FROM river );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the capital of the largest state
#
### SQL:
#
# SELECT capital FROM state WHERE area = ( SELECT MAX ( area ) FROM state );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the capital city of the largest state in the us
#
### SQL:
#
# SELECT capital FROM state WHERE area = ( SELECT MAX ( area ) FROM state );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many cities are in texas
#
### SQL:
#
# SELECT COUNT ( city_name ) FROM city WHERE state_name = "texas";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many cities does texas have
#
### SQL:
#
# SELECT COUNT ( city_name ) FROM city WHERE state_name = "texas";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the area of the states
#
### SQL:
#
# SELECT area FROM state;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many states in the us does the shortest river run through
#
### SQL:
#
# SELECT COUNT ( DISTINCT traverse ) FROM river WHERE LENGTH = ( SELECT MIN ( DISTINCT LENGTH ) FROM river );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what rivers flow through states that border the state with the largest population
#
### SQL:
#
# SELECT river_name FROM river WHERE traverse IN ( SELECT border FROM border_info WHERE state_name IN ( SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state ) ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what are the major cities in the largest state
#
### SQL:
#
# SELECT city_name FROM city WHERE population > 150000 AND state_name = ( SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the area of the smallest state
#
### SQL:
#
# SELECT area FROM state WHERE area = ( SELECT MIN ( area ) FROM state );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# which states border the longest river in the usa
#
### SQL:
#
# SELECT border FROM border_info WHERE state_name IN ( SELECT traverse FROM river WHERE LENGTH = ( SELECT MAX ( LENGTH ) FROM river ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the population density of the state with the smallest population
#
### SQL:
#
# SELECT density FROM state WHERE population = ( SELECT MIN ( population ) FROM state );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many states border the mississippi river
#
### SQL:
#
# SELECT COUNT ( DISTINCT border ) FROM border_info WHERE state_name IN ( SELECT traverse FROM river WHERE river_name = "mississippi" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what states have a capital that is the highest point in the state
#
### SQL:
#
# SELECT t1.state_name FROM state AS t1 JOIN highlow AS t2 ON t1.capital = t2.highest_point;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the population of the capital of the smallest state
#
### SQL:
#
# SELECT population FROM city WHERE city_name = ( SELECT capital FROM state WHERE area = ( SELECT MIN ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the population of the capital of the largest state
#
### SQL:
#
# SELECT population FROM city WHERE city_name = ( SELECT capital FROM state WHERE area = ( SELECT MAX ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the lowest point of the state with the largest area
#
### SQL:
#
# SELECT t2.lowest_point FROM state AS t1 JOIN highlow AS t2 ON t1.state_name = t2.state_name WHERE t1.state_name IN ( SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what states border states that border the state with the largest population
#
### SQL:
#
# SELECT t1.border FROM border_info AS t2 JOIN border_info AS t1 ON t2.border = t1.state_name WHERE t2.state_name IN ( SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the size of the largest state in the usa
#
### SQL:
#
# SELECT MAX ( area ) FROM state;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the area of the largest state
#
### SQL:
#
# SELECT MAX ( area ) FROM state;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# which capitals are not major cities
#
### SQL:
#
# SELECT t2.capital FROM state AS t2 JOIN city AS t1 ON t2.capital = t1.city_name WHERE t1.population <= 150000;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# give me the cities in usa
#
### SQL:
#
# SELECT city_name FROM city;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the highest point of the state with the largest area
#
### SQL:
#
# SELECT t2.highest_point FROM state AS t1 JOIN highlow AS t2 ON t1.state_name = t2.state_name WHERE t1.state_name IN ( SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# where is massachusetts
#
### SQL:
#
# SELECT country_name FROM state WHERE state_name = "massachusetts";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what state has the largest urban population
#
### SQL:
#
# SELECT state_name FROM city GROUP BY state_name ORDER BY SUM ( population ) DESC LIMIT 1;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what are the major rivers in the us
#
### SQL:
#
# SELECT river_name FROM river;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many cities named austin are there in the usa
#
### SQL:
#
# SELECT COUNT ( city_name ) FROM city WHERE city_name = "austin";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many people live in the smallest state bordering wyoming
#
### SQL:
#
# SELECT population FROM state WHERE population = ( SELECT MAX ( population ) FROM state WHERE state_name IN ( SELECT border FROM border_info WHERE state_name = "wyoming" ) ) AND state_name IN ( SELECT border FROM border_info WHERE state_name = "wyoming" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the length of the colorado river in texas
#
### SQL:
#
# SELECT LENGTH FROM river WHERE river_name = "colorado" AND traverse = "texas";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the population density in the state with capital austin
#
### SQL:
#
# SELECT density FROM state WHERE capital = "austin";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how long is the shortest river in the usa
#
### SQL:
#
# SELECT LENGTH FROM river WHERE LENGTH = ( SELECT MIN ( LENGTH ) FROM river );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the elevation of death valley
#
### SQL:
#
# SELECT lowest_elevation FROM highlow WHERE lowest_point = "death valley";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the average population of the us by state
#
### SQL:
#
# SELECT AVG ( population ) FROM state;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what rivers flow through the largest state
#
### SQL:
#
# SELECT river_name FROM river WHERE traverse IN ( SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what states border states that border states that border states that border texas
#
### SQL:
#
# SELECT t1.border FROM border_info AS t2 JOIN border_info AS t1 ON t2.border = t1.state_name JOIN border_info AS t3 ON t3.border = t2.state_name JOIN border_info AS t4 ON t4.border = t3.state_name WHERE t4.state_name = "texas";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many states border on the state whose capital is boston
#
### SQL:
#
# SELECT COUNT ( border ) FROM border_info WHERE state_name = ( SELECT state_name FROM state WHERE capital = "boston" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what are the major cities in the states through which the major river in virginia runs
#
### SQL:
#
# SELECT city_name FROM city WHERE population > 150000 AND state_name IN ( SELECT traverse FROM river WHERE river_name IN ( SELECT river_name FROM river WHERE LENGTH > 750 AND traverse = "virginia" ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# which states does not border texas
#
### SQL:
#
# SELECT state_name FROM state WHERE state_name NOT IN ( SELECT border FROM border_info WHERE state_name = "texas" );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many states border the largest state
#
### SQL:
#
# SELECT COUNT ( border ) FROM border_info WHERE state_name = ( SELECT state_name FROM state WHERE area = ( SELECT MAX ( area ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# which state is the largest city in montana in
#
### SQL:
#
# SELECT state_name FROM city WHERE population = ( SELECT MAX ( population ) FROM city WHERE state_name = "montana" ) AND state_name = "montana";
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is capital of the state with the lowest point
#
### SQL:
#
# SELECT t1.capital FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t2.lowest_elevation = ( SELECT MIN ( lowest_elevation ) FROM highlow ) ;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the biggest american city in a state with a river
#
### SQL:
#
# SELECT DISTINCT t1.city_name FROM city AS t1 JOIN river AS t2 ON t2.traverse = t1.state_name WHERE t1.population = ( SELECT MAX ( t1.population ) FROM river AS t2 JOIN city AS t1 ON t2.traverse = t1.state_name );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many rivers are in the state with the largest population
#
### SQL:
#
# SELECT COUNT ( t2.river_name ) FROM river AS t2 JOIN state AS t1 ON t1.state_name = t2.traverse WHERE t1.state_name = ( SELECT state_name FROM state WHERE population = ( SELECT MAX ( population ) FROM state ) );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the largest state that borders the state with the lowest point in the usa
#
### SQL:
#
# SELECT t1.state_name FROM highlow AS t3 JOIN border_info AS t1 ON t3.state_name = t1.border JOIN state AS t2 ON t2.state_name = t1.border WHERE t3.lowest_elevation = ( SELECT MIN ( lowest_elevation ) FROM highlow ) ORDER BY t2.area DESC LIMIT 1;
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the capital of the state with the highest point
#
### SQL:
#
# SELECT t1.capital FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t2.highest_elevation = ( SELECT MAX ( highest_elevation ) FROM highlow );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the capital of the state with the highest elevation
#
### SQL:
#
# SELECT t1.capital FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t2.highest_elevation = ( SELECT MAX ( highest_elevation ) FROM highlow );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the highest point in the smallest state
#
### SQL:
#
# SELECT t2.highest_point FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t1.area = ( SELECT MIN ( area ) FROM state );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how many rivers are in the state with the highest point.
#
### SQL:
#
# SELECT COUNT ( t1.river_name ) FROM highlow AS t2 JOIN river AS t1 ON t1.traverse = t2.state_name WHERE t2.highest_elevation = ( SELECT MAX ( highest_elevation ) FROM highlow );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# how high is the highest point in the largest state
#
### SQL:
#
# SELECT t2.highest_elevation FROM highlow AS t2 JOIN state AS t1 ON t1.state_name = t2.state_name WHERE t1.area = ( SELECT MAX ( area ) FROM state );
#
### End.
|
geo
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# 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 )
#
# city.state_name can be joined with state.state_name
# border_info.border can be joined with state.state_name
# border_info.state_name can be joined with state.state_name
# highlow.state_name can be joined with state.state_name
# mountain.state_name can be joined with state.state_name
# river.traverse can be joined with state.state_name
#
### Question:
#
# what is the longest river in the state with the highest point
#
### SQL:
#
# SELECT t1.river_name FROM highlow AS t2 JOIN river AS t1 ON t1.traverse = t2.state_name WHERE t2.highest_elevation = ( SELECT MAX ( highest_elevation ) FROM highlow ) ORDER BY t1.length DESC LIMIT 1;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# papers that are coauthored by Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# papers written by Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# what are the papers that have Peter Mertens and Dina Barbian as co-authors
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# What papers have Peter Mertens and Dina Barbian written ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# what paper did Peter Mertens and Dina Barbian write together ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Has Peter Mertens and Dina Barbian written a paper together ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Papers by Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# papers by authors Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# What papers were written by authors Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# papers by Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# papers written by authors Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# When did Peter Mertens and Dina Barbian collaborate ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# what are the collaborations of Peter Mertens and Dina Barbian ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Have Peter Mertens and Dina Barbian written a paper together ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Peter Mertens and Dina Barbian as co-authors
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Does Peter Mertens ever collaborated with Dina Barbian ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Which papers have Peter Mertens and Dina Barbian as co-authors ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# papers coauthored by Peter Mertens and Dina Barbian
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# What papers have been written by Peter Mertens and Dina Barbian ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# What papers have been written by both Peter Mertens and Dina Barbian ?
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# What papers have been written by Peter Mertens and Dina Barbian .
#
### SQL:
#
# SELECT DISTINCT t3.paperid FROM writes AS t3 JOIN author AS t2 ON t3.authorid = t2.authorid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t2.authorname = "Peter Mertens" AND t1.authorname = "Dina Barbian";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who has written the most syntactic parsing papers ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who is the most published author in syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who has the most publications in syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who has written the most papers on syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# List prominent scholars in syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who wrote the most papers on syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# Who are the authors with the most published papers in syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# top syntactic parsing author
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# top author in syntactic parsing
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who published the most in syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# who published the most papers in syntactic parsing ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = "syntactic parsing" GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# How many citation noah a smith has ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.citedpaperid ) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "noah a smith";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# noah a smith citation count
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.citedpaperid ) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "noah a smith";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# how many citations does noah a smith have ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.citedpaperid ) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "noah a smith";
#
### End.
|
scholar
|
### Complete SQL query only and with no explanation
### SQL tables followed by foreign key information:
#
# venue ( venueId, venueName )
# author ( authorId, authorName )
# dataset ( datasetId, datasetName )
# journal ( journalId, journalName )
# keyphrase ( keyphraseId, keyphraseName )
# paper ( paperId, title, venueId, year, numCiting, numCitedBy, journalId )
# cite ( citingPaperId, citedPaperId )
# paperDataset ( paperId, datasetId )
# paperKeyphrase ( paperId, keyphraseId )
# writes ( paperId, authorId )
#
# paper.venueId can be joined with venue.venueId
# paper.journalId can be joined with journal.journalId
# cite.citingPaperId can be joined with paper.paperId
# cite.citedPaperId can be joined with paper.paperId
# paperKeyphrase.keyphraseId can be joined with keyphrase.keyphraseId
# paperKeyphrase.paperId can be joined with paper.paperId
# writes.authorId can be joined with author.authorId
# writes.paperId can be joined with paper.paperId
#
### Question:
#
# How many citations does noah a smith have ?
#
### SQL:
#
# SELECT DISTINCT COUNT ( t4.citedpaperid ) FROM paper AS t3 JOIN cite AS t4 ON t3.paperid = t4.citedpaperid JOIN writes AS t2 ON t2.paperid = t3.paperid JOIN author AS t1 ON t2.authorid = t1.authorid WHERE t1.authorname = "noah a smith";
#
### End.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.