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 \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: When the score was 71-71-70-70=282 what was the To par recorded?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"score\"='71-71-70-70=282';"
}
] |
[
{
"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: What was the score for Tom Lehman?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='tom lehman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the sum of November, when Game is greater than 23?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"november\") FROM \"schedule_and_results\" WHERE \"game\">23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the sum of November, when Game is \"17\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"november\") FROM \"schedule_and_results\" WHERE \"game\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the highest Game, when Opponent is \"Chicago Black Hawks\", and when November is less than 16?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='chicago black hawks' AND \"november\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What player has a total of 297?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"=297;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which country has a total less than 289 and finished t2?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"total\"<289 AND \"finish\"='t2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which player finished t35?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"finish\"='t35';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What finish has a total of more than 289 and won in 1979?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"total\">289 AND \"year_s_won\"='1979';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is Name, when Moving To is \"NEC Nijmegen\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"loan_out\" WHERE \"moving_to\"='nec nijmegen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is Date From, when Moving To is \"Birmingham City\"?"
},
{
"role": "assistant",
"content": "SELECT \"date_from\" FROM \"loan_out\" WHERE \"moving_to\"='birmingham city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is Pos., when Date To is \"30 June 2009\", and when Name is \"Eddie Johnson\"?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"loan_out\" WHERE \"date_to\"='30 june 2009' AND \"name\"='eddie johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is Pos., when Date From is \"28 August 2008\"?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"loan_out\" WHERE \"date_from\"='28 august 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is Moving To, when Name is \"Leon Andreasen\"?"
},
{
"role": "assistant",
"content": "SELECT \"moving_to\" FROM \"loan_out\" WHERE \"name\"='leon andreasen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is Date To, when Name is \"Lee Cook\"?"
},
{
"role": "assistant",
"content": "SELECT \"date_to\" FROM \"loan_out\" WHERE \"name\"='lee cook';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: When was the oakachoy covered bridge listed?"
},
{
"role": "assistant",
"content": "SELECT \"listed\" FROM \"references\" WHERE \"name\"='oakachoy covered bridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: In which county is the swann covered bridge located?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"references\" WHERE \"name\"='swann covered bridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: Which bridge is located in Nectar, in Blount County?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"references\" WHERE \"county\"='blount' AND \"location\"='nectar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: Which county built a bridge in 1934?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"references\" WHERE \"built\"='1934';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: In which year did Blount County build a bridge in Cleveland that was listed on 1981-08-20?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"references\" WHERE \"county\"='blount' AND \"listed\"='1981-08-20' AND \"location\"='cleveland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the score with a time at 18:00 and a score for set 3 of 13\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"pool_b\" WHERE \"time\"='18:00' AND \"set_3\"='13\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the score for set 2 when the score of set 1 is 19\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"set_2\" FROM \"pool_b\" WHERE \"set_1\"='19\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: How much is the total with a time at 16:00 and score for set 3 of 18\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"pool_b\" WHERE \"time\"='16:00' AND \"set_3\"='18\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the score for set 2 when the time is 18:00 and the score of set 1 is 18\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"set_2\" FROM \"pool_b\" WHERE \"time\"='18:00' AND \"set_1\"='18\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What was the total with a score in set 3 of 13\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"pool_b\" WHERE \"set_3\"='13\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_champions\" (\n \"year\" text,\n \"champion_seed\" text,\n \"score\" text,\n \"runner_up_seed\" text,\n \"most_valuable_player\" text\n);\n\nQuestion: What was the Champion of the Tournament with a Score of 79\u201375 OT?"
},
{
"role": "assistant",
"content": "SELECT \"champion_seed\" FROM \"tournament_champions\" WHERE \"score\"='79\u201375 ot';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_champions\" (\n \"year\" text,\n \"champion_seed\" text,\n \"score\" text,\n \"runner_up_seed\" text,\n \"most_valuable_player\" text\n);\n\nQuestion: What was the Champion of the Game with a Score of 65\u201356?"
},
{
"role": "assistant",
"content": "SELECT \"champion_seed\" FROM \"tournament_champions\" WHERE \"score\"='65\u201356';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Manufacturer has a Laps of 21, a Grid larger than 16, and a Rider of akira ry\u014d?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"laps\"=21 AND \"grid\">16 AND \"rider\"='akira ry\u014d';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Time/Retired has a Rider of daijiro kato?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"rider\"='daijiro kato';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Manufacturer has a Rider of daijiro kato?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"rider\"='daijiro kato';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Time/Retired has a Manufacturer of yamaha, and a Rider of garry mccoy?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"manufacturer\"='yamaha' AND \"rider\"='garry mccoy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the name of the team with round less than 2, and the nationality is the United States?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\"<2 AND \"nationality\"='united states';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What position does John Carlson play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='john carlson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the highest rebounds on game 5?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"game\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Overall went in a round larger than 7 with a pick less than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\">7 AND \"pick\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_money_leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"events\" real,\n \"prize_money\" real\n);\n\nQuestion: What is the largest event number for player from Norway with prize money less than $2,241,847?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"events\") FROM \"2013_money_leaders\" WHERE \"country\"='norway' AND \"prize_money\"<'2,241,847';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_money_leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"events\" real,\n \"prize_money\" real\n);\n\nQuestion: What is the rank for the player with events greater than 23 and prize money in excess of $823,783?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"2013_money_leaders\" WHERE \"events\">23 AND \"prize_money\">'823,783';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_money_leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"events\" real,\n \"prize_money\" real\n);\n\nQuestion: What is the prize money for the player ranked 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"prize_money\") FROM \"2013_money_leaders\" WHERE \"rank\"=1;"
}
] |
[
{
"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 \"event\" text,\n \"round\" real\n);\n\nQuestion: What was the lowest round for the KOTC 25: Flaming Fury event?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"event\"='kotc 25: flaming fury';"
}
] |
[
{
"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 \"event\" text,\n \"round\" real\n);\n\nQuestion: Who was the opponent for the KOTC 25: Flaming Fury event?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='kotc 25: flaming fury';"
}
] |
[
{
"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 \"event\" text,\n \"round\" real\n);\n\nQuestion: Who was the opponent in the WMMA 1: McCorkle vs. Heden event that went more than 1 round?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\">1 AND \"event\"='wmma 1: mccorkle vs. heden';"
}
] |
[
{
"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 \"event\" text,\n \"round\" real\n);\n\nQuestion: What was the result when his record was 25-15?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='25-15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Position, when Round is less than 6, and when Nationality is \"Denmark\"?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"round\"<6 AND \"nationality\"='denmark';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Position, when Nationality is \"Canada\", and when Round is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"round\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the total number of Round, when College/Junior/Club Team (League) is \"Kelowna Rockets ( WHL )\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='kelowna rockets ( whl )';"
}
] |
[
{
"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\" text,\n \"location\" text\n);\n\nQuestion: What round did the fight last when Mikhail Ilyukhin's record was 15-5?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='15-5';"
}
] |
[
{
"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\" text,\n \"location\" text\n);\n\nQuestion: What method did Mikhail Ilyukhin win the fight in round 1 when his record was 13-5?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='1' AND \"res\"='win' AND \"record\"='13-5';"
}
] |
[
{
"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\" text,\n \"location\" text\n);\n\nQuestion: What was the method of resolution when Mikhail Ilyukhin's record was 4-0?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: When was the score 123-112?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"december\" WHERE \"score\"='123-112';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who did they play when the score was 95-118?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"december\" WHERE \"score\"='95-118';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who did they play when the score was 95-114?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"december\" WHERE \"score\"='95-114';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: When was the score 92-134?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"december\" WHERE \"score\"='92-134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: When they were 2-32 what did they score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"december\" WHERE \"record\"='2-32';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_in_the_field\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: When the total was smaller than 290, what was the highest To par?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"to_par\") FROM \"past_champions_in_the_field\" WHERE \"total\"<290;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_in_the_field\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: What is the total number of To par for Lee Trevino?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"to_par\") FROM \"past_champions_in_the_field\" WHERE \"player\"='lee trevino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_in_the_field\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: What is the sum of To par when the Finish is t11?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"to_par\") FROM \"past_champions_in_the_field\" WHERE \"finish\"='t11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_batting_averages\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"innings\" real,\n \"runs\" real,\n \"average\" real,\n \"highest_score\" text,\n \"100s\" real\n);\n\nQuestion: What was Donald Bradman's average runs?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"runs\") FROM \"best_batting_averages\" WHERE \"player\"='donald bradman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_batting_averages\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"innings\" real,\n \"runs\" real,\n \"average\" real,\n \"highest_score\" text,\n \"100s\" real\n);\n\nQuestion: What was the highest amount of runs for more than 5 matches?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"runs\") FROM \"best_batting_averages\" WHERE \"matches\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"province\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the lowest Shot Pct., when Blank Ends is greater than 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"shot_pct\") FROM \"standings\" WHERE \"blank_ends\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"province\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is Shot Pct., when Stolen Ends is 2?"
},
{
"role": "assistant",
"content": "SELECT \"shot_pct\" FROM \"standings\" WHERE \"stolen_ends\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"province\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the total number of Ends Won, when Province is \"Saskatchewan\", and when Stolen Ends is less than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"ends_won\") FROM \"standings\" WHERE \"province\"='saskatchewan' AND \"stolen_ends\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: On what date were Perth Wildcats the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"away_team\"='perth wildcats';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: On what date was the score 121-113?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"score\"='121-113';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: On what date was Adelaide 36ers the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"home_team\"='adelaide 36ers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Which report is for Townsville Entertainment Centre?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"round_10\" WHERE \"venue\"='townsville entertainment centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Which home team had a score of 85-101?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_10\" WHERE \"score\"='85-101';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the box core for the Melbourne Tigers?"
},
{
"role": "assistant",
"content": "SELECT \"box_score\" FROM \"round_10\" WHERE \"home_team\"='melbourne tigers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"series_sorted\" text,\n \"title\" text,\n \"author\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: who is the author when featuring is leela, the master, kraals?"
},
{
"role": "assistant",
"content": "SELECT \"author\" FROM \"series_1\" WHERE \"featuring\"='leela, the master, kraals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"series_sorted\" text,\n \"title\" text,\n \"author\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: who is the author when the title is destination: nerva?"
},
{
"role": "assistant",
"content": "SELECT \"author\" FROM \"series_1\" WHERE \"title\"='destination: nerva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"series_sorted\" text,\n \"title\" text,\n \"author\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: who is featuring when the title is energy of the daleks?"
},
{
"role": "assistant",
"content": "SELECT \"featuring\" FROM \"series_1\" WHERE \"title\"='energy of the daleks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"series_sorted\" text,\n \"title\" text,\n \"author\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: what is the title when the featuring is leela and series sorted is 4s/b?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"series_1\" WHERE \"featuring\"='leela' AND \"series_sorted\"='4s/b';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Opponent that has the December of 2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"december\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the average December rhat has the Opponent of @ toronto maple leafs?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"december\") FROM \"schedule_and_results\" WHERE \"opponent\"='@ toronto maple leafs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Score that has the December of 10?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"december\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the Tie no was 6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"tie_no\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the Tie no less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"tie_no\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team when the home team was Sunderland?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"home_team\"='sunderland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Which Winning Team has the Fastest Lap of brendon hartley, and a Pole Position of oliver turvey, and a Circuit of spa-francorchamps, and the Winning Driver of brendon hartley?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"calendar\" WHERE \"fastest_lap\"='brendon hartley' AND \"pole_position\"='oliver turvey' AND \"circuit\"='spa-francorchamps' AND \"winning_driver\"='brendon hartley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Which Circuit has the Winning Team of carlin motorsport, and the Winning Driver of oliver turvey, and a Date of 24 march?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"calendar\" WHERE \"winning_team\"='carlin motorsport' AND \"winning_driver\"='oliver turvey' AND \"date\"='24 march';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Which Round has the Winning Driver of brendon hartley, and a Date of 27 april?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"calendar\" WHERE \"winning_driver\"='brendon hartley' AND \"date\"='27 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Which Date has a Pole Position of michael devaney?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"calendar\" WHERE \"pole_position\"='michael devaney';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Which Report has a Winning driver of emerson fittipaldi?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"races\" WHERE \"winning_driver\"='emerson fittipaldi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Which Circuit has a Pole position of andr\u00e9 ribeiro?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"races\" WHERE \"pole_position\"='andr\u00e9 ribeiro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Which Circuit has a Winning driver of scott pruett?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"races\" WHERE \"winning_driver\"='scott pruett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Who's the Winning driver with a Pole position of bryan herta?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"races\" WHERE \"pole_position\"='bryan herta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Which Date had a City/Location of vancouver, british columbia?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"races\" WHERE \"city_location\"='vancouver, british columbia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Who's the Winning team with a Pole position of robby gordon, and a Date of june 11?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"races\" WHERE \"pole_position\"='robby gordon' AND \"date\"='june 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_pronouns_nominative_case\" (\n \"subject\" real,\n \"proximity\" text,\n \"honor\" text,\n \"singular\" text,\n \"plural\" text\n);\n\nQuestion: What subject has a plural of am(\u00f4)ra (we)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"subject\") FROM \"personal_pronouns_nominative_case\" WHERE \"plural\"='am(\u00f4)ra (we)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What round was the player drafted from mississippi valley state?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"college\"='mississippi valley state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college was the draft pick from who plays center position?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"position\"='center';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game with the toronto huskies as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='toronto huskies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent on November 14?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='november 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game with a game number greater than 7 at boston garden with the providence steam rollers as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\">7 AND \"location\"='boston garden' AND \"opponent\"='providence steam rollers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What pick in round 5 did the 49ers pick Jim Pilot?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='jim pilot' AND \"round\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What pick in a round earlier than 4 did UCLA choose their pick?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"nfl_draft\" WHERE \"round\"<4 AND \"school_club_team\"='ucla';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position did pick 36 play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\"=36;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_distaff_turf_mile_stakes_\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Who is the owner of Miss Terrible?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"winners_of_the_distaff_turf_mile_stakes_\" WHERE \"winner\"='miss terrible';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_distaff_turf_mile_stakes_\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is the most recent year that had a time of 1:36.69?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"winners_of_the_distaff_turf_mile_stakes_\" WHERE \"time\"='1:36.69';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_distaff_turf_mile_stakes_\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What time does the trainer, Todd Pletcher have?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"winners_of_the_distaff_turf_mile_stakes_\" WHERE \"trainer\"='todd pletcher';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_distaff_turf_mile_stakes_\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is the most recent year that Iftiraas was the winner?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"winners_of_the_distaff_turf_mile_stakes_\" WHERE \"winner\"='iftiraas';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.