chat_prompt stringlengths 438 1.53k |
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2007/ 08 has a 2011/ 12 of ur?"
},
{
"role": "assistant",
"content": "SELECT \"2007_08\" FROM \"performance_and_rankings_timeline\" WHERE \"2011_12\"='ur';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Attendance on September 11, 1983?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='september 11, 1983';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Opponent during the game with a Result of W 37-21?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='w 37-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Result on Week 8?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_d_belgium\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest number of games with less than 1 loss?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"games\") FROM \"world_championship_group_d_belgium\" WHERE \"lost\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"club\" text,\n \"nation\" text,\n \"points\" real\n);\n\nQuestion: What was the nationality of the skater with 108.8 points?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"men\" WHERE \"points\"=108.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"club\" text,\n \"nation\" text,\n \"points\" real\n);\n\nQuestion: How many points for the skater from club btsc?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"men\" WHERE \"club\"='btsc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"films_directed_by_tarkovsky\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"length\" text\n);\n\nQuestion: Which Original title has a Year of 1983, and a Country of italy?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"films_directed_by_tarkovsky\" WHERE \"year\"=1983 AND \"country\"='italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"films_directed_by_tarkovsky\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"length\" text\n);\n\nQuestion: How many years have an Original title of \u0438\u0432\u0430\u043d\u043e\u0432\u043e \u0434\u0435\u0442\u0441\u0442\u0432\u043e?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"films_directed_by_tarkovsky\" WHERE \"original_title\"='\u0438\u0432\u0430\u043d\u043e\u0432\u043e \u0434\u0435\u0442\u0441\u0442\u0432\u043e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"films_directed_by_tarkovsky\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"length\" text\n);\n\nQuestion: Which Length has a Country of soviet union, and a Year larger than 1975?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"films_directed_by_tarkovsky\" WHERE \"country\"='soviet union' AND \"year\">1975;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is listed as the lowest Year with a Wins that's smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is listed for the Wins with a Year of 1989?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"motorcycle_grand_prix_results\" WHERE \"year\"=1989;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is listed for the Class that's got a Team of Cagiva and Points of 4?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='cagiva' AND \"points\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"district\" text,\n \"district_headquarters\" text,\n \"area_km_2\" real,\n \"population_1991_census\" real,\n \"population_2001_census\" real\n);\n\nQuestion: How many km2 has a Population 2001 Census larger than 274,095, and a District Headquarters of jharsuguda?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"area_km_2\") FROM \"population\" WHERE \"population_2001_census\">'274,095' AND \"district_headquarters\"='jharsuguda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"district\" text,\n \"district_headquarters\" text,\n \"area_km_2\" real,\n \"population_1991_census\" real,\n \"population_2001_census\" real\n);\n\nQuestion: What is the number of Population 2001 Census that has 476,815 in Population 1991 Census?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population_2001_census\") FROM \"population\" WHERE \"population_1991_census\"='476,815';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"district\" text,\n \"district_headquarters\" text,\n \"area_km_2\" real,\n \"population_1991_census\" real,\n \"population_2001_census\" real\n);\n\nQuestion: What is the number of Population 2001 Census that has jharsuguda District Headquarters with an Area smaller than 2,081?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population_2001_census\") FROM \"population\" WHERE \"district_headquarters\"='jharsuguda' AND \"area_km_2\"<'2,081';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text\n);\n\nQuestion: What played has 3 as the losing bonus?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2011_2012_table\" WHERE \"losing_bonus\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text\n);\n\nQuestion: What is the try bonus that has llangefni rfc as the club?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2011_2012_table\" WHERE \"club\"='llangefni rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text\n);\n\nQuestion: What played has 247 as the points?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2011_2012_table\" WHERE \"points_for\"='247';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text\n);\n\nQuestion: What try bonus has 19 as the tries against?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2011_2012_table\" WHERE \"tries_against\"='19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text\n);\n\nQuestion: What points has 18 for the played and bala rfc as the club?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2011_2012_table\" WHERE \"played\"='18' AND \"club\"='bala rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text\n);\n\nQuestion: What try bonus has 18 as the played of and 204 as the points?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2011_2012_table\" WHERE \"played\"='18' AND \"points_for\"='204';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What record has montreal as the visitor, and february 2 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"visitor\"='montreal' AND \"date\"='february 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What record has February 25 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='february 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What date has boston as the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='boston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What score has vancouver as the home, and february 16 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"home\"='vancouver' AND \"date\"='february 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Team of corinthians, and a Lost larger than 15 has which highest drawn?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"drawn\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"team\"='corinthians' AND \"lost\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Difference of - 20, and a Position smaller than 17 is the highest against?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"difference\"='- 20' AND \"position\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Against smaller than 53, and a Drawn smaller than 10, and a Played smaller than 38 has what average points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"against\"<53 AND \"drawn\"<10 AND \"played\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which score was for Toronto Maple Leafs at home on November 12?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"home\"='toronto maple leafs' AND \"date\"='november 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which home team had a visitor of Chicago Black Hawks with a score of 2\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"regular_season\" WHERE \"visitor\"='chicago black hawks' AND \"score\"='2\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was home on November 26?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='november 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the visitor with a record of 5\u20138\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"record\"='5\u20138\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"rank\" real,\n \"name\" text,\n \"point\" real,\n \"played\" real,\n \"draw\" real,\n \"lose\" real,\n \"goal_in\" real,\n \"goal_loss\" real,\n \"goal_diff\" real\n);\n\nQuestion: What was the average rank of a player with more than 52 points, fewer than 10 draws, a goal loss under 44, and a loss under 15?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"league_table\" WHERE \"point\">52 AND \"draw\"<10 AND \"goal_loss\"<44 AND \"lose\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"rank\" real,\n \"name\" text,\n \"point\" real,\n \"played\" real,\n \"draw\" real,\n \"lose\" real,\n \"goal_in\" real,\n \"goal_loss\" real,\n \"goal_diff\" real\n);\n\nQuestion: What was the highest number of lose for a player named Santos with more than 45 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lose\") FROM \"league_table\" WHERE \"name\"='santos' AND \"point\">45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_cup_group_stage\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" text,\n \"report\" text\n);\n\nQuestion: What report has a score of 0-0 with Sydney FC?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"pre_season_cup_group_stage\" WHERE \"score\"='0-0' AND \"away_team\"='sydney fc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_cup_group_stage\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" text,\n \"report\" text\n);\n\nQuestion: On what date was the score 0-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pre_season_cup_group_stage\" WHERE \"score\"='0-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_cup_group_stage\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" text,\n \"report\" text\n);\n\nQuestion: Which home team had the score 1-3?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"pre_season_cup_group_stage\" WHERE \"score\"='1-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_cup_group_stage\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" text,\n \"report\" text\n);\n\nQuestion: Where did the away team have round 2?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"pre_season_cup_group_stage\" WHERE \"away_team\"='round 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_cup_group_stage\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" text,\n \"report\" text\n);\n\nQuestion: When did the venue of round 3 happen?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pre_season_cup_group_stage\" WHERE \"venue\"='round 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lg_as\" (\n \"local_government_area\" text,\n \"principal_town\" text,\n \"land_area_km\" real,\n \"population_2011_census\" real,\n \"density\" real\n);\n\nQuestion: What is the lowest density of a town with a 13,708 2011 population census ?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"density\") FROM \"lg_as\" WHERE \"population_2011_census\"='13,708';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"escape_velocities_at_altitude\" (\n \"orbit\" text,\n \"center_to_center_distance\" text,\n \"altitude_above_the_earth_s_surface\" text,\n \"orbital_period\" text,\n \"specific_orbital_energy\" text\n);\n\nQuestion: specific orbital energy of \u221229.8 mj/kg has what orbit?"
},
{
"role": "assistant",
"content": "SELECT \"orbit\" FROM \"escape_velocities_at_altitude\" WHERE \"specific_orbital_energy\"='\u221229.8 mj/kg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"escape_velocities_at_altitude\" (\n \"orbit\" text,\n \"center_to_center_distance\" text,\n \"altitude_above_the_earth_s_surface\" text,\n \"orbital_period\" text,\n \"specific_orbital_energy\" text\n);\n\nQuestion: altitude above the Earth's surface of 500 to 39,900 km has what orbital period?"
},
{
"role": "assistant",
"content": "SELECT \"orbital_period\" FROM \"escape_velocities_at_altitude\" WHERE \"altitude_above_the_earth_s_surface\"='500 to 39,900 km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"escape_velocities_at_altitude\" (\n \"orbit\" text,\n \"center_to_center_distance\" text,\n \"altitude_above_the_earth_s_surface\" text,\n \"orbital_period\" text,\n \"specific_orbital_energy\" text\n);\n\nQuestion: specific orbital energy of \u22120.5 mj/kg is what altitude above the earth's surface?"
},
{
"role": "assistant",
"content": "SELECT \"altitude_above_the_earth_s_surface\" FROM \"escape_velocities_at_altitude\" WHERE \"specific_orbital_energy\"='\u22120.5 mj/kg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"escape_velocities_at_altitude\" (\n \"orbit\" text,\n \"center_to_center_distance\" text,\n \"altitude_above_the_earth_s_surface\" text,\n \"orbital_period\" text,\n \"specific_orbital_energy\" text\n);\n\nQuestion: Earth's surface of 357,000 to 399,000 km has what orbit altitude above?"
},
{
"role": "assistant",
"content": "SELECT \"orbit\" FROM \"escape_velocities_at_altitude\" WHERE \"altitude_above_the_earth_s_surface\"='357,000 to 399,000 km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"escape_velocities_at_altitude\" (\n \"orbit\" text,\n \"center_to_center_distance\" text,\n \"altitude_above_the_earth_s_surface\" text,\n \"orbital_period\" text,\n \"specific_orbital_energy\" text\n);\n\nQuestion: Orbital period of 89 to 128 min has what specific orbital energy?"
},
{
"role": "assistant",
"content": "SELECT \"specific_orbital_energy\" FROM \"escape_velocities_at_altitude\" WHERE \"orbital_period\"='89 to 128 min';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"escape_velocities_at_altitude\" (\n \"orbit\" text,\n \"center_to_center_distance\" text,\n \"altitude_above_the_earth_s_surface\" text,\n \"orbital_period\" text,\n \"specific_orbital_energy\" text\n);\n\nQuestion: center-to-center distance of 6,900 to 46,300 km involves which orbital period?"
},
{
"role": "assistant",
"content": "SELECT \"orbital_period\" FROM \"escape_velocities_at_altitude\" WHERE \"center_to_center_distance\"='6,900 to 46,300 km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What was the lowest FA Cup for a Malaysia Cup of 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"fa_cup\") FROM \"scorers\" WHERE \"malaysia_cup\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is Zamri Hassan's lowest Malaysia Cup when there were an FA Cup of 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"malaysia_cup\") FROM \"scorers\" WHERE \"player\"='zamri hassan' AND \"fa_cup\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scorers\" (\n \"player\" text,\n \"league\" real,\n \"malaysia_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest league for the Malaysia Cup when it was larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"league\") FROM \"scorers\" WHERE \"malaysia_cup\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists_by_nation\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Bronze medals did Switzerland with less than 3 Silver medals receive?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medallists_by_nation\" WHERE \"nation\"='switzerland' AND \"silver\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists_by_nation\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least amount of Silver medals that have more than 3 Bronze?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medallists_by_nation\" WHERE \"bronze\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the average game for March 8 with less than 84 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"regular_season\" WHERE \"points\"<84 AND \"march\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the latest in March when the record of 35\u201316\u20136\u20133?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"march\") FROM \"regular_season\" WHERE \"record\"='35\u201316\u20136\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Name the competition for score of 3-0"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"brazil_national_team\" WHERE \"score\"='3-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Name the competition for september 10, 2008"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"brazil_national_team\" WHERE \"date\"='september 10, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Name the sscore for world cup qualifying october 15, 2008"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"brazil_national_team\" WHERE \"competition\"='world cup qualifying' AND \"date\"='october 15, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Name the competition for november 19, 2008"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"brazil_national_team\" WHERE \"date\"='november 19, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"city\" text,\n \"result\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Name the date for rio de janeiro"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"brazil_national_team\" WHERE \"city\"='rio de janeiro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What number is Fall 08 from the state with 57 in Fall 06 and 74 or less in Fall 05?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fall_08\") FROM \"geography_of_students\" WHERE \"fall_06\"=57 AND \"fall_05\"<74;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What number is Fall 06 from the state with 79 or less in Fall 08, 36 or greater in Fall 07 and greater than 74 in Fall 05?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fall_06\") FROM \"geography_of_students\" WHERE \"fall_08\"<79 AND \"fall_07\">36 AND \"fall_05\">74;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What number is Fall 06 from the state with 34 for Fall 09?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fall_06\") FROM \"geography_of_students\" WHERE \"fall_09\"=34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toronto_maple_leafs_4_montreal_canadiens\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record when the visitor was toronto maple leafs and the score was 3\u201310?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"toronto_maple_leafs_4_montreal_canadiens\" WHERE \"visitor\"='toronto maple leafs' AND \"score\"='3\u201310';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toronto_maple_leafs_4_montreal_canadiens\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score when the visitor was toronto maple leafs on march 22?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"toronto_maple_leafs_4_montreal_canadiens\" WHERE \"visitor\"='toronto maple leafs' AND \"date\"='march 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"toronto_maple_leafs_4_montreal_canadiens\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the Visitor when the home was toronto maple leafs and the score was 4\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"toronto_maple_leafs_4_montreal_canadiens\" WHERE \"home\"='toronto maple leafs' AND \"score\"='4\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"auction_history\" (\n \"auction_house\" text,\n \"year\" real,\n \"event\" text,\n \"price\" real,\n \"gbp_price\" real\n);\n\nQuestion: What is the average GBP Price with an event in Monterey, a RM auction house, and a price of $154,000 later than 2003?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gbp_price\") FROM \"auction_history\" WHERE \"event\"='monterey' AND \"auction_house\"='rm' AND \"price\"='154,000' AND \"year\">2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings_broadcast_history\" (\n \"season\" real,\n \"network\" text,\n \"time_slot\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"episode_count\" real,\n \"tv_season\" text,\n \"season_rank\" text,\n \"viewers_in_millions\" real\n);\n\nQuestion: How many total episodes aired over all seasons with 7.79 million viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode_count\") FROM \"seasonal_ratings_broadcast_history\" WHERE \"viewers_in_millions\"=7.79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_challenge_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: Was the semi-final round held at home or away?"
},
{
"role": "assistant",
"content": "SELECT \"h_a\" FROM \"manchester_and_district_challenge_cup\" WHERE \"round\"='semi-final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_challenge_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: Which opponent made it to the final round?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"manchester_and_district_challenge_cup\" WHERE \"round\"='final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_challenge_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: What was the result of the game played in hurst?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"manchester_and_district_challenge_cup\" WHERE \"h_a\"='hurst';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_challenge_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: When did the game in whalley range take place?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"manchester_and_district_challenge_cup\" WHERE \"h_a\"='whalley range';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_powered_stations\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which ERP W is the lowest one that has a Frequency MHz of 91.3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"erp_w\") FROM \"full_powered_stations\" WHERE \"frequency_m_hz\"=91.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_powered_stations\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which Class has a Frequency MHz of 107.5?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"full_powered_stations\" WHERE \"frequency_m_hz\"=107.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_powered_stations\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which Frequency MHz is the highest one that has a City of license of byron, ga?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"frequency_m_hz\") FROM \"full_powered_stations\" WHERE \"city_of_license\"='byron, ga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_powered_stations\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which FCC info has a Call sign of wsja?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"full_powered_stations\" WHERE \"call_sign\"='wsja';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which District has a Party of republican and a Result of lost re-election democratic gain?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"california\" WHERE \"party\"='republican' AND \"result\"='lost re-election democratic gain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What is First elected that has republican Party and a Result of retired democratic gain?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"california\" WHERE \"party\"='republican' AND \"result\"='retired democratic gain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What is the First elected of california 3?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"california\" WHERE \"district\"='california 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which Incumbent has a Result of retired democratic gain?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"california\" WHERE \"result\"='retired democratic gain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which First elected has a Incumbent of none (new seat)?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"california\" WHERE \"incumbent\"='none (new seat)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What is the First elected that has a republican party and california 4?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"california\" WHERE \"party\"='republican' AND \"district\"='california 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tennent_s_scottish_cup\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What was the result when Dundee was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"tennent_s_scottish_cup\" WHERE \"opponent\"='dundee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_9_2009\" (\n \"celebrity\" text,\n \"famous_for\" text,\n \"entered\" text,\n \"exited\" text,\n \"finished\" text\n);\n\nQuestion: Who entered on day 1 and exited on day 20?"
},
{
"role": "assistant",
"content": "SELECT \"celebrity\" FROM \"series_9_2009\" WHERE \"entered\"='day 1' AND \"exited\"='day 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_9_2009\" (\n \"celebrity\" text,\n \"famous_for\" text,\n \"entered\" text,\n \"exited\" text,\n \"finished\" text\n);\n\nQuestion: When did lucy benjamin exit?"
},
{
"role": "assistant",
"content": "SELECT \"exited\" FROM \"series_9_2009\" WHERE \"celebrity\"='lucy benjamin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_9_2009\" (\n \"celebrity\" text,\n \"famous_for\" text,\n \"entered\" text,\n \"exited\" text,\n \"finished\" text\n);\n\nQuestion: When did camilla dallerup finish?"
},
{
"role": "assistant",
"content": "SELECT \"finished\" FROM \"series_9_2009\" WHERE \"celebrity\"='camilla dallerup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_9_2009\" (\n \"celebrity\" text,\n \"famous_for\" text,\n \"entered\" text,\n \"exited\" text,\n \"finished\" text\n);\n\nQuestion: When did kim woodburn enter?"
},
{
"role": "assistant",
"content": "SELECT \"entered\" FROM \"series_9_2009\" WHERE \"celebrity\"='kim woodburn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game with a record of 37\u201326\u20139?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"record\"='37\u201326\u20139';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game with a record of 33\u201325\u20139?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"record\"='33\u201325\u20139';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Loss of francis (4\u20139) has what highest attendance figure?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"loss\"='francis (4\u20139)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Loss of de la rosa (8\u20138) has what average attendance?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"loss\"='de la rosa (8\u20138)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Loss of francis (4\u201310) happened on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='francis (4\u201310)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score on 8 September 1999?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='8 september 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result on 16 November 2003?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='16 november 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Set 1 has a Set 2 of 26\u201324?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"pool_a\" WHERE \"set_2\"='26\u201324';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Set 2 has a Date of 25 may, and a Set 3 of 21\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"set_2\" FROM \"pool_a\" WHERE \"date\"='25 may' AND \"set_3\"='21\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Date has a Set 3 of 21\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_a\" WHERE \"set_3\"='21\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Set 1 has a Date of 24 may, and a Total of 57\u201375?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"pool_a\" WHERE \"date\"='24 may' AND \"total\"='57\u201375';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Set 2 has a Set 1 of 25\u201315, and a Score of 3\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"set_2\" FROM \"pool_a\" WHERE \"set_1\"='25\u201315' AND \"score\"='3\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Total has a Set 1 of 25\u201322?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"pool_a\" WHERE \"set_1\"='25\u201322';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2002\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What was the segment b for Netflix s01e21?"
},
{
"role": "assistant",
"content": "SELECT \"segment_b\" FROM \"season_2_2002\" WHERE \"netflix\"='s01e21';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.