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 \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated\" text,\n \"result\" text\n);\n\nQuestion: Which category was Maite Perroni nominated for earlier than 2009?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"nominated\"='maite perroni' AND \"year\"<2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated\" text,\n \"result\" text\n);\n\nQuestion: In what year was there an award for TV Adicto Golden Awards and the category Female Revelation?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"awards_and_nominations\" WHERE \"award\"='tv adicto golden awards' AND \"category\"='female revelation';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What winner has silence-lotto as the team classification?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"jersey_progress\" WHERE \"team_classification\"='silence-lotto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What general classification has david de la fuente as mountains classification, and thor hushovd as points classification?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"jersey_progress\" WHERE \"mountains_classification\"='david de la fuente' AND \"points_classification\"='thor hushovd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What general classification has levi leipheimer as points classification?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"jersey_progress\" WHERE \"points_classification\"='levi leipheimer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What team classification has alejandro valverde as points classification, with alejandro valverde as the winner, with 3 as the stage?"
},
{
"role": "assistant",
"content": "SELECT \"team_classification\" FROM \"jersey_progress\" WHERE \"points_classification\"='alejandro valverde' AND \"winner\"='alejandro valverde' AND \"stage\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What winner has pierre rolland as mountains classification, with 7 as the stage?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"jersey_progress\" WHERE \"mountains_classification\"='pierre rolland' AND \"stage\"='7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What general classification has 4 as the stage?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"jersey_progress\" WHERE \"stage\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What are the lowest lost has 111 as the goals against?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"first_division_final_table\" WHERE \"goals_against\"=111;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest goals against that has 15 as position?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_against\") FROM \"first_division_final_table\" WHERE \"position\"=15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Hiw many losses have 30 for the goals with points greater than 24?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"group_i\" WHERE \"goals_for\"=30 AND \"points\">24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many draws have goals for less than 56, 10 as the postion, with goals against less than 45?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draws\") FROM \"group_i\" WHERE \"goals_for\"<56 AND \"position\"=10 AND \"goals_against\"<45;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the highest draws that have 31 for points, wins greater than 12, with a goal difference less than 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draws\") FROM \"group_i\" WHERE \"points\"=31 AND \"wins\">12 AND \"goal_difference\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Name Road Team of Game of game 4?"
},
{
"role": "assistant",
"content": "SELECT \"road_team\" FROM \"nba_finals\" WHERE \"game\"='game 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Date has a Road Team of chicago, and a Result of 88-85 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nba_finals\" WHERE \"road_team\"='chicago' AND \"result\"='88-85 (ot)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Home Team is on june 12?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"date\"='june 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Result that is on june 5?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"nba_finals\" WHERE \"date\"='june 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Date has Result of 86-87?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nba_finals\" WHERE \"result\"='86-87';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Result has a Game of game 1?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"nba_finals\" WHERE \"game\"='game 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1973_until_1991\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: What Miss Maja Pilipinas has a Binibining Pilipinas-Tourism of not awarded, and a Binibining Pilipinas-Universe of anjanette abayari?"
},
{
"role": "assistant",
"content": "SELECT \"miss_maja_pilipinas\" FROM \"title_holders_from_1973_until_1991\" WHERE \"binibining_pilipinas_tourism\"='not awarded' AND \"binibining_pilipinas_universe\"='anjanette abayari';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1973_until_1991\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: What Binibining Pilipinas-International has a Year larger than 1990, and a Binibining Pilipinas-Universe of maria lourdes gonzalez?"
},
{
"role": "assistant",
"content": "SELECT \"binibining_pilipinas_international\" FROM \"title_holders_from_1973_until_1991\" WHERE \"year\">1990 AND \"binibining_pilipinas_universe\"='maria lourdes gonzalez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1973_until_1991\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: What First runner-up has a Miss Maja Pilipinas of nanette prodigalidad?"
},
{
"role": "assistant",
"content": "SELECT \"first_runner_up\" FROM \"title_holders_from_1973_until_1991\" WHERE \"miss_maja_pilipinas\"='nanette prodigalidad';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1973_until_1991\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: What is the smallest Year with a Binibining Pilipinas-International of jessie alice salones dixson?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"title_holders_from_1973_until_1991\" WHERE \"binibining_pilipinas_international\"='jessie alice salones dixson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1973_until_1991\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: What Binibining Pilipinas-International has a Year of 1975?"
},
{
"role": "assistant",
"content": "SELECT \"binibining_pilipinas_international\" FROM \"title_holders_from_1973_until_1991\" WHERE \"year\"=1975;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is To par, when Player is \"Jesper Parnevik\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='jesper parnevik';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Player, when Place is \"1\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is To par, when Country is \"United States\", and when Player is \"Mark Brooks\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='united states' AND \"player\"='mark brooks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Player is \"Phil Mickelson\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='phil mickelson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Player is \"Brad Faxon\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='brad faxon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vuko_karov_tournament\" (\n \"edition\" real,\n \"year\" real,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: What was the edition after 2003 when the Third was Tikve\u0161 and Sileks was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"edition\") FROM \"vuko_karov_tournament\" WHERE \"year\">2003 AND \"third\"='tikve\u0161' AND \"runner_up\"='sileks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vuko_karov_tournament\" (\n \"edition\" real,\n \"year\" real,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: What was the latest year with an edition of 14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"vuko_karov_tournament\" WHERE \"edition\"=14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What was the venue for the game on 18/03/2006?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2006\" WHERE \"date\"='18/03/2006';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the score when the place was t8?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"place\"='t8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What country scored 71-66-66-71=274?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='71-66-66-71=274';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What country scored 66-65-66-72=269?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='66-65-66-72=269';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the money for place t3 and United States?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"place\"='t3' AND \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What country does Jeff Sluman play for?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"player\"='jeff sluman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the to par for place t8 and a score of 71-66-66-71=274?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"place\"='t8' AND \"score\"='71-66-66-71=274';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What home team played against Fleetwood Town?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"away_team\"='fleetwood town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"am\" (\n \"frequency\" real,\n \"power_d_n\" text,\n \"callsign\" text,\n \"brand\" text,\n \"city_of_license\" text\n);\n\nQuestion: What callsign has 1300 as the frequency?"
},
{
"role": "assistant",
"content": "SELECT \"callsign\" FROM \"am\" WHERE \"frequency\"=1300;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_c\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: What's the name of the stadium when the club was F.C. Igea Virtus Barcellona?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"girone_c\" WHERE \"club\"='f.c. igea virtus barcellona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_c\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: Who was the club when during the 2007-08 season had 12th in serie c2/c?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"girone_c\" WHERE \"2007_08_season\"='12th in serie c2/c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_c\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: Who was the club when during the 2007-08 season had 14th in serie c2/c?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"girone_c\" WHERE \"2007_08_season\"='14th in serie c2/c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_c\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: What is the capacity when the 2007\u201308 season was 1st Serie D/I?"
},
{
"role": "assistant",
"content": "SELECT \"capacity\" FROM \"girone_c\" WHERE \"2007_08_season\"='1st serie d/i';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_c\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: What was the largest capacity when the club was F.C. Igea Virtus Barcellona?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"capacity\") FROM \"girone_c\" WHERE \"club\"='f.c. igea virtus barcellona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tournaments_in_junior_san_yaku_komu\" (\n \"name\" text,\n \"total\" real,\n \"first\" text,\n \"last\" text,\n \"highest_rank\" text\n);\n\nQuestion: Who had a total of 34?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"most_tournaments_in_junior_san_yaku_komu\" WHERE \"total\"=34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tournaments_in_junior_san_yaku_komu\" (\n \"name\" text,\n \"total\" real,\n \"first\" text,\n \"last\" text,\n \"highest_rank\" text\n);\n\nQuestion: What rank is Takat\u014driki having less than 30 total?"
},
{
"role": "assistant",
"content": "SELECT \"highest_rank\" FROM \"most_tournaments_in_junior_san_yaku_komu\" WHERE \"total\"<30 AND \"name\"='takat\u014driki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tournaments_in_junior_san_yaku_komu\" (\n \"name\" text,\n \"total\" real,\n \"first\" text,\n \"last\" text,\n \"highest_rank\" text\n);\n\nQuestion: What was the total when the first was November 1966?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"most_tournaments_in_junior_san_yaku_komu\" WHERE \"first\"='november 1966';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tournaments_in_junior_san_yaku_komu\" (\n \"name\" text,\n \"total\" real,\n \"first\" text,\n \"last\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is the last when the first was January 2001 and more than 26 total?"
},
{
"role": "assistant",
"content": "SELECT \"last\" FROM \"most_tournaments_in_junior_san_yaku_komu\" WHERE \"total\">26 AND \"first\"='january 2001';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tournaments_in_junior_san_yaku_komu\" (\n \"name\" text,\n \"total\" real,\n \"first\" text,\n \"last\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is the greatest total when the last was September 1970?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"most_tournaments_in_junior_san_yaku_komu\" WHERE \"last\"='september 1970';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tournaments_in_junior_san_yaku_komu\" (\n \"name\" text,\n \"total\" real,\n \"first\" text,\n \"last\" text,\n \"highest_rank\" text\n);\n\nQuestion: What rank is Takat\u014driki?"
},
{
"role": "assistant",
"content": "SELECT \"highest_rank\" FROM \"most_tournaments_in_junior_san_yaku_komu\" WHERE \"name\"='takat\u014driki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What year has 54 (73) points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"complete_world_championship_formula_one_\" WHERE \"pts\"='54 (73)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What is the chassis more recent than 1967?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_world_championship_formula_one_\" WHERE \"year\">1967;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What is the year of the Lotus 25 chassis?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"complete_world_championship_formula_one_\" WHERE \"chassis\"='lotus 25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" text\n);\n\nQuestion: What is the year of the Lotus 18 chassis?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"complete_world_championship_formula_one_\" WHERE \"chassis\"='lotus 18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is First Elected, when District is \"Minnesota 2\"?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"minnesota\" WHERE \"district\"='minnesota 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the lowest First Elected, when Party is \"Republican\", and when District is \"Minnesota 1\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"minnesota\" WHERE \"party\"='republican' AND \"district\"='minnesota 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is Party, when Results is \"Re-Elected\", when First Elected is greater than 1990, and when District is \"Minnesota 4\"?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"minnesota\" WHERE \"results\"='re-elected' AND \"first_elected\">1990 AND \"district\"='minnesota 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is Incumbent, when Results is \"Re-Elected\", when Party is \"Democratic\", and when District is \"Minnesota 7\"?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"minnesota\" WHERE \"results\"='re-elected' AND \"party\"='democratic' AND \"district\"='minnesota 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Score has a Place of t5, and a Country of united states?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"place\"='t5' AND \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Name The Score of Player of seve ballesteros?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='seve ballesteros';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Country has a Place of 2?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"place\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many wins did they have when they had 5 losses?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"2007_ladder\" WHERE \"losses\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many byes did they have against smaller than 1544, 13 wins, and draws larger than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"byes\") FROM \"2007_ladder\" WHERE \"against\"<1544 AND \"wins\"=13 AND \"draws\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many byes has a draw larger than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"byes\") FROM \"2007_ladder\" WHERE \"draws\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest against that has less than 9 wins, and draws smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2007_ladder\" WHERE \"wins\"<9 AND \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of wins that has byes less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"2007_ladder\" WHERE \"byes\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the most money for the score 75-74-72-67=288?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"money\") FROM \"final_leaderboard\" WHERE \"score\"='75-74-72-67=288';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"long_vowels\" (\n \"long_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text\n);\n\nQuestion: What's the American pronunciation when the Australian is \u0259\u0289?"
},
{
"role": "assistant",
"content": "SELECT \"american\" FROM \"long_vowels\" WHERE \"australian\"='\u0259\u0289';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"long_vowels\" (\n \"long_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text\n);\n\nQuestion: What is the 17th c. pronunciation when the british is \u0259\u028a?"
},
{
"role": "assistant",
"content": "SELECT \"17th_c\" FROM \"long_vowels\" WHERE \"british\"='\u0259\u028a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"long_vowels\" (\n \"long_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text\n);\n\nQuestion: What is the 17th c. pronunciation when the British is i and the long vowels are e /i\u02d0/?"
},
{
"role": "assistant",
"content": "SELECT \"17th_c\" FROM \"long_vowels\" WHERE \"british\"='i' AND \"long_vowels\"='e /i\u02d0/';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"long_vowels\" (\n \"long_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text\n);\n\nQuestion: What's the British pronunciation when the American and Australian is i?"
},
{
"role": "assistant",
"content": "SELECT \"british\" FROM \"long_vowels\" WHERE \"american\"='i' AND \"australian\"='i';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the Height if the weight is kg (lb), the club is Sainte-foy and the pos is cf?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"canada\" WHERE \"weight\"='kg (lb)' AND \"club\"='sainte-foy' AND \"pos\"='cf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the height of val\u00e9rie dionne at Club Sainte-Foy?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"canada\" WHERE \"club\"='sainte-foy' AND \"name\"='val\u00e9rie dionne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: Who has a Date of Birth 1980-07-29?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"canada\" WHERE \"date_of_birth\"='1980-07-29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cooperative_programs\" (\n \"team_name\" text,\n \"schools\" text,\n \"sports\" text,\n \"host\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"enrollment_2013_14\" real\n);\n\nQuestion: What is the name of the team from cisne fairfield school?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"cooperative_programs\" WHERE \"schools\"='cisne fairfield';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cooperative_programs\" (\n \"team_name\" text,\n \"schools\" text,\n \"sports\" text,\n \"host\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"enrollment_2013_14\" real\n);\n\nQuestion: What is the name of the team from goreville vienna school?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"cooperative_programs\" WHERE \"schools\"='goreville vienna';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cooperative_programs\" (\n \"team_name\" text,\n \"schools\" text,\n \"sports\" text,\n \"host\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"enrollment_2013_14\" real\n);\n\nQuestion: What are the colors of the team hosted by Christopher?"
},
{
"role": "assistant",
"content": "SELECT \"colors\" FROM \"cooperative_programs\" WHERE \"host\"='christopher';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is team 1 if Renova is team 2?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"second_qualifying_round\" WHERE \"team_2\"='renova';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What is the highest to par for the 76-70-76-76=298 score?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"to_par\") FROM \"final_leaderboard\" WHERE \"score\"='76-70-76-76=298';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What score has a to par of 12 and is from Jersey?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"to_par\"=12 AND \"country\"='jersey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What is the average money for a to par of 15, and is from the United States?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"money\") FROM \"final_leaderboard\" WHERE \"to_par\"=15 AND \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What is the total amount of money that has a t2 place, is from the United States for player Leo Diegel?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"money\") FROM \"final_leaderboard\" WHERE \"place\"='t2' AND \"country\"='united states' AND \"player\"='leo diegel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What county has less than $188 and a score of 74-76-73-75=298?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"money\"<188 AND \"score\"='74-76-73-75=298';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Opponent, when Location is \"Winnipeg, Manitoba , Canada\"?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='winnipeg, manitoba , canada';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Res., when Location is \"Butte, Montana , United States\", and when Opponent is \"Jerome Smith\"?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='butte, montana , united states' AND \"opponent\"='jerome smith';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Method, when Time is \"3:20\"?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='3:20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Location, when Opponent is \"Mario Rinaldi\"?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='mario rinaldi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How much Grid has a Time/Retired of +0.785, and Laps larger than 29?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"125cc_classification\" WHERE \"time_retired\"='+0.785' AND \"laps\">29;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid has more than 8 Laps, and a Manufacturer of honda, and a Time/Retired of retirement?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"125cc_classification\" WHERE \"laps\">8 AND \"manufacturer\"='honda' AND \"time_retired\"='retirement';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many Laps have a Grid smaller than 5, and a Time/Retired of retirement?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"125cc_classification\" WHERE \"grid\"<5 AND \"time_retired\"='retirement';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Time/Retired has Laps smaller than 14, and a Rider of darren barton?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"125cc_classification\" WHERE \"laps\"<14 AND \"rider\"='darren barton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What was the lowest lost entry for a team with fewer than 21 goals for?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"third_division_final_table\" WHERE \"goals_for\"<21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What was the position has a played entry of more than 24?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"third_division_final_table\" WHERE \"played\">24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest position for Nelson, with a played entry of more than 24?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"third_division_final_table\" WHERE \"team\"='nelson' AND \"played\">24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What was the average Lost entry for Newton, for games with a drawn less than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"third_division_final_table\" WHERE \"team\"='newton' AND \"drawn\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest lost entry that has a drawn entry less than 6, goals against less than 44, and a points 1 entry of 27?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"third_division_final_table\" WHERE \"drawn\"<6 AND \"goals_against\"<44 AND \"points_1\"='27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heavyweight_105_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" text,\n \"clean_jerk\" text,\n \"total_kg\" text\n);\n\nQuestion: Who has a Snatch of 157.0?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"heavyweight_105_kg\" WHERE \"snatch\"='157.0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heavyweight_105_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" text,\n \"clean_jerk\" text,\n \"total_kg\" text\n);\n\nQuestion: What is the total bodyweight of everyone that has a Snatch of 153.0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bodyweight\") FROM \"heavyweight_105_kg\" WHERE \"snatch\"='153.0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_and_structures\" (\n \"rank\" text,\n \"name\" text,\n \"height_metres_ft\" text,\n \"floors\" text,\n \"year\" real\n);\n\nQuestion: What ranking is the Battersea Power Station?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"tallest_buildings_and_structures\" WHERE \"name\"='battersea power station';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.