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 \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: How many are enrolled at 49 Marion with the Warriors as their mascot?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"num_county\"='49 marion' AND \"mascot\"='warriors';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Where is Terre Haute North located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='terre haute north';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What's the enrollment at 41 Johnson?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"num_county\"='41 johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: At Indianapolis North Central that has greater than 1,829 enrolled, what is the IHSAA Football Class?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\">'1,829' AND \"school\"='indianapolis north central';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"mascot\" text,\n \"location\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What school has the greyhounds as mascots?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='greyhounds';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotive_collection\" (\n \"name\" text,\n \"livery\" text,\n \"arrival\" real,\n \"type\" text,\n \"configuration\" text,\n \"builder\" text,\n \"built\" real,\n \"status\" text,\n \"location\" text\n);\n\nQuestion: for type diesel-mechanical and configuration b-b, what is the status?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"locomotive_collection\" WHERE \"configuration\"='b-b' AND \"type\"='diesel-mechanical';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aircraft_inventory\" (\n \"aircraft\" text,\n \"origin\" text,\n \"type\" text,\n \"versions\" text,\n \"in_service\" real\n);\n\nQuestion: Where is the origin of the tth version?"
},
{
"role": "assistant",
"content": "SELECT \"origin\" FROM \"aircraft_inventory\" WHERE \"versions\"='tth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the record of game 7?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"game\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest number of points of the game before game 2 before October 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"regular_season\" WHERE \"october\"<10 AND \"game\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: what team played on july 9"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='july 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: What is the party of re-elected, incumbent Charles H. Grosvenor, who was first elected before 1894?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"ohio\" WHERE \"result\"='re-elected' AND \"first_elected\"<1894 AND \"incumbent\"='charles h. grosvenor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Who was the incumbent from the Ohio 13 district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"ohio\" WHERE \"district\"='ohio 13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: What is the party of the representative first elected in 1894 from the Ohio 16 district?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"ohio\" WHERE \"first_elected\"=1894 AND \"district\"='ohio 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"narrowest_margin_of_runs_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: What score has Leicestershire as the opponent after 1906?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"narrowest_margin_of_runs_victory\" WHERE \"opposition\"='leicestershire' AND \"year\">1906;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"narrowest_margin_of_runs_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: Where in Buxton has 3 runs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"narrowest_margin_of_runs_victory\" WHERE \"score\"='3 runs' AND \"city\"='buxton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"narrowest_margin_of_runs_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: What city was in 1889?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"narrowest_margin_of_runs_victory\" WHERE \"year\"=1889;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"narrowest_margin_of_runs_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: What is the score in Leicester?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"narrowest_margin_of_runs_victory\" WHERE \"city\"='leicester';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"narrowest_margin_of_runs_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: How many years has 1 run?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"narrowest_margin_of_runs_victory\" WHERE \"score\"='1 run';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"narrowest_margin_of_runs_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: What year was in Aigburth?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"narrowest_margin_of_runs_victory\" WHERE \"venue\"='aigburth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_8\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"format_num\" text,\n \"title\" text,\n \"original_airdate\" text\n);\n\nQuestion: Which season has q145 as its format?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season_num\") FROM \"season_8\" WHERE \"format_num\"='q145';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_8\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"format_num\" text,\n \"title\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the average episode number with q146 format?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"episode_num\") FROM \"season_8\" WHERE \"format_num\"='q146';"
}
] |
[
{
"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 \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent of Game 1 with a 3-2-0 record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"game\">1 AND \"record\"='3-2-0';"
}
] |
[
{
"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 \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is game 9's record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"game\"=9;"
}
] |
[
{
"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 \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent of the team with a 1-1-0 record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"record\"='1-1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3rd_liga_promotion_round\" (\n \"date\" text,\n \"2nd_bundesliga_16th\" text,\n \"3rd_liga_3rd\" text,\n \"game_1\" text,\n \"game_2\" text\n);\n\nQuestion: What date has Liga 3rd of Dynamo Dresden?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"3rd_liga_promotion_round\" WHERE \"3rd_liga_3rd\"='dynamo dresden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3rd_liga_promotion_round\" (\n \"date\" text,\n \"2nd_bundesliga_16th\" text,\n \"3rd_liga_3rd\" text,\n \"game_1\" text,\n \"game_2\" text\n);\n\nQuestion: What is the 3rd Liga from 2010-11?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_liga_3rd\" FROM \"3rd_liga_promotion_round\" WHERE \"date\"='2010-11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3rd_liga_promotion_round\" (\n \"date\" text,\n \"2nd_bundesliga_16th\" text,\n \"3rd_liga_3rd\" text,\n \"game_1\" text,\n \"game_2\" text\n);\n\nQuestion: What is the 3rd Liga from Game 1 of 0-1 between the years 2008-09?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_liga_3rd\" FROM \"3rd_liga_promotion_round\" WHERE \"game_1\"='0-1' AND \"date\"='2008-09';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_15_9_6\" (\n \"outcome\" text,\n \"date\" real,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Score in the final has an Outcome of winner, and a Surface of hard (i)?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"doubles_15_9_6\" WHERE \"outcome\"='winner' AND \"surface\"='hard (i)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_15_9_6\" (\n \"outcome\" text,\n \"date\" real,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Surface has a Partner of jim thomas, and a Date of 2007?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_15_9_6\" WHERE \"partner\"='jim thomas' AND \"date\"=2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" real,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text\n);\n\nQuestion: What was the Attendance in the game with a Result of won 5-2?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"november\" WHERE \"result\"='won 5-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" real,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text\n);\n\nQuestion: What was the home Competition with Attendance of 1,268?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"november\" WHERE \"venue\"='home' AND \"attendance\"='1,268';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"wnba_team\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school or club team did the player chosen for the Sacramento Monarchs play for?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"round_1\" WHERE \"wnba_team\"='sacramento monarchs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"wnba_team\" text,\n \"school_club_team\" text\n);\n\nQuestion: What player was chosen for the Chicago Sky?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_1\" WHERE \"wnba_team\"='chicago sky';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"wnba_team\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player was picked for the Chicago Sky?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_1\" WHERE \"wnba_team\"='chicago sky';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2009_10\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What is the position of the player with a height of 205 and shirt no 8?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"team_roster_season_2009_10\" WHERE \"height\"=205 AND \"shirt_no\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2009_10\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What is the name of the player who is a height of 182?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"team_roster_season_2009_10\" WHERE \"height\"=182;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_tally\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"participants\" real\n);\n\nQuestion: What is the sum of Gold with Participants that are 4 and a Silver that is smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_tally\" WHERE \"participants\"=4 AND \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Who was the opponent with a score of 141\u2013102?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"score\"='141\u2013102';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Who was the opponent with a score of 109\u2013108?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"score\"='109\u2013108';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the result when the record was 62\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"record\"='62\u201312';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the result with a record of 58\u201311?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"record\"='58\u201311';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"number\" real,\n \"result\" text,\n \"date\" text,\n \"score\" text,\n \"opponent\" text,\n \"record\" text\n);\n\nQuestion: What's the number of the game played on January 2, 1936?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number\") FROM \"game_log\" WHERE \"date\"='january 2, 1936';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"number\" real,\n \"result\" text,\n \"date\" text,\n \"score\" text,\n \"opponent\" text,\n \"record\" text\n);\n\nQuestion: What's the record of game number 23?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"number\"=23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many Points a February smaller than 1 have?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"regular_season\" WHERE \"february\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many February days have Points of 63 and a Score of 1\u20132?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"february\") FROM \"regular_season\" WHERE \"points\"=63 AND \"score\"='1\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the name of the player with less than 2 wins?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"leaders\" WHERE \"wins\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the number of earning for more than 2 wins and less than 25 events?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"earnings\") FROM \"leaders\" WHERE \"wins\">2 AND \"events\"<25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the largest events number for more than 2 wins and less than $446,893 in earnings?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"events\") FROM \"leaders\" WHERE \"wins\">2 AND \"earnings\"<'446,893';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the largest events with earning less than $384,489 ranked more than 4 with less than 1 win?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"events\") FROM \"leaders\" WHERE \"earnings\"<'384,489' AND \"rank\">4 AND \"wins\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"time\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor at 5:00 pm?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"pre_season\" WHERE \"time\"='5:00 pm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"time\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor at the pittsburgh penguins at 7:00 pm that had a record of 0-2-2?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"pre_season\" WHERE \"home\"='pittsburgh penguins' AND \"time\"='7:00 pm' AND \"record\"='0-2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"time\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the home in mellon arena at 7:30 pm with a record o 2-5-2?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"pre_season\" WHERE \"time\"='7:30 pm' AND \"location_attendance\"='mellon arena' AND \"record\"='2-5-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_norway\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which average Drawn has Games larger than 7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"drawn\") FROM \"world_championship_group_b_norway\" WHERE \"games\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_commercial_lines_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Make has a Pos of 3?"
},
{
"role": "assistant",
"content": "SELECT \"make\" FROM \"american_commercial_lines_200\" WHERE \"pos\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_commercial_lines_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Car # has a Make of toyota, and a Driver of mike skinner, and a Pos larger than 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"car_num\") FROM \"american_commercial_lines_200\" WHERE \"make\"='toyota' AND \"driver\"='mike skinner' AND \"pos\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_commercial_lines_200\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Make has a Car # larger than 59?"
},
{
"role": "assistant",
"content": "SELECT \"make\" FROM \"american_commercial_lines_200\" WHERE \"car_num\">59;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1962\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What was the result of the Euro '64 qualifying game?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"1962\" WHERE \"type_of_game\"='euro ''64 qualifying';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1962\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What is the date of the Euro '64 qualifying game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1962\" WHERE \"type_of_game\"='euro ''64 qualifying';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"language\" text,\n \"notes\" text\n);\n\nQuestion: What was the title in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"television\" WHERE \"year\"='1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"language\" text,\n \"notes\" text\n);\n\nQuestion: What was the role in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"television\" WHERE \"year\"='2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"language\" text,\n \"notes\" text\n);\n\nQuestion: What language was Taken in?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"television\" WHERE \"title\"='taken';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"language\" text,\n \"notes\" text\n);\n\nQuestion: Which title had Notes of 8 episodes?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"television\" WHERE \"notes\"='8 episodes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"language\" text,\n \"notes\" text\n);\n\nQuestion: Which title is in Portuguese?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"television\" WHERE \"language\"='portuguese';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"language\" text,\n \"notes\" text\n);\n\nQuestion: What was the role in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"television\" WHERE \"year\"='1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_pacific_hurricane_statistics\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: what date did the irwin storm take place"
},
{
"role": "assistant",
"content": "SELECT \"dates_active\" FROM \"2011_pacific_hurricane_statistics\" WHERE \"storm_name\"='irwin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_pacific_hurricane_statistics\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: what is the minimum force of storm Adrian"
},
{
"role": "assistant",
"content": "SELECT \"min_press_mbar\" FROM \"2011_pacific_hurricane_statistics\" WHERE \"storm_name\"='adrian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"florida_counties_ranked_by_per_capita_in\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: How many households are in highlands county?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"number_of_households\") FROM \"florida_counties_ranked_by_per_capita_in\" WHERE \"county\"='highlands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"florida_counties_ranked_by_per_capita_in\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the Median household income associated with a median family income of $46,616?"
},
{
"role": "assistant",
"content": "SELECT \"median_household_income\" FROM \"florida_counties_ranked_by_per_capita_in\" WHERE \"median_family_income\"='$46,616';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What time did the game at memorial stadium take place?"
},
{
"role": "assistant",
"content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"location\"='memorial stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of Bronze medals of the Nation with 64 total and silver greater than 16?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"total\"=64 AND \"silver\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the bronze for Kyrgyzstan nation with a silver record of greater than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='kyrgyzstan' AND \"silver\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the gold for the nation with a record of bronze 1, Syria nation with a grand total less than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=1 AND \"nation\"='syria' AND \"total\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"game_time\" text,\n \"record\" text\n);\n\nQuestion: When was the game with a result of w 27-24 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 27-24 (ot)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"game_time\" text,\n \"record\" text\n);\n\nQuestion: When was the game with a record of 9-3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"record\"='9-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"game_time\" text,\n \"record\" text\n);\n\nQuestion: What time was the game with a record of 7-3?"
},
{
"role": "assistant",
"content": "SELECT \"game_time\" FROM \"schedule\" WHERE \"record\"='7-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What is the number of weeks where the venue was memorial stadium and the attendance was less than 41,252?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"venue\"='memorial stadium' AND \"attendance\"<'41,252';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What is the sum of the weeks that games occured on october 21, 1974 and less than 50,623 fans attended?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"date\"='october 21, 1974' AND \"attendance\"<'50,623';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"launched\" text,\n \"transmitting_from\" text,\n \"coverage\" text,\n \"languages\" text,\n \"frequency\" text\n);\n\nQuestion: What is the frequency of the station that was launched on 21 August 1994?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"stations\" WHERE \"launched\"='21 august 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"launched\" text,\n \"transmitting_from\" text,\n \"coverage\" text,\n \"languages\" text,\n \"frequency\" text\n);\n\nQuestion: What is the launched date of the station in cora huichol tepehuano nahuatl language?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"stations\" WHERE \"languages\"='cora huichol tepehuano nahuatl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"launched\" text,\n \"transmitting_from\" text,\n \"coverage\" text,\n \"languages\" text,\n \"frequency\" text\n);\n\nQuestion: Where is the station with a coverage of yucat\u00e1n quintana roo campeche transmitting from?"
},
{
"role": "assistant",
"content": "SELECT \"transmitting_from\" FROM \"stations\" WHERE \"coverage\"='yucat\u00e1n quintana roo campeche';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"launched\" text,\n \"transmitting_from\" text,\n \"coverage\" text,\n \"languages\" text,\n \"frequency\" text\n);\n\nQuestion: What is the frequency of the station with a coverage of oaxaca guerrero puebla?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"stations\" WHERE \"coverage\"='oaxaca guerrero puebla';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"launched\" text,\n \"transmitting_from\" text,\n \"coverage\" text,\n \"languages\" text,\n \"frequency\" text\n);\n\nQuestion: Where is the station that was launched on 17 July 1997 transmitting from?"
},
{
"role": "assistant",
"content": "SELECT \"transmitting_from\" FROM \"stations\" WHERE \"launched\"='17 july 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"launched\" text,\n \"transmitting_from\" text,\n \"coverage\" text,\n \"languages\" text,\n \"frequency\" text\n);\n\nQuestion: What is the coverage of the station that was launched on 22 January 1996?"
},
{
"role": "assistant",
"content": "SELECT \"coverage\" FROM \"stations\" WHERE \"launched\"='22 january 1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes for the nation ranked 14th, with over 14 golds and over 25 silvers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"all_time_medal_table\" WHERE \"gold\">14 AND \"rank\"='14' AND \"silver\">25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total medals for germany with under 56 bronzes?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"all_time_medal_table\" WHERE \"nation\"='germany' AND \"bronze\"<56;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total medals for the nation with 1 gold and 6 bronzes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"all_time_medal_table\" WHERE \"gold\"=1 AND \"bronze\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the game when the record was 32\u201334?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='32\u201334';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game with a score of 15\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='15\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers_and_news_sites\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: what is the frequency of visits to elmanana.com.mx"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"newspapers_and_news_sites\" WHERE \"website\"='elmanana.com.mx';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the game result against the minnesota vikings?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='minnesota vikings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What week shows for december 31, 1993?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='december 31, 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result on October 4, 1993?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='october 4, 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Week has a Result of l 17-14?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"result\"='l 17-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievemens\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: How many years have a position of 2nd?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievemens\" WHERE \"position\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievemens\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which event has a year of 2000?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"achievemens\" WHERE \"year\"=2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievemens\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What position has notes of 2:12:53?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"achievemens\" WHERE \"notes\"='2:12:53';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1978_pittsburgh_steelers_draft_selection\" (\n \"round\" real,\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text,\n \"tenure_w_steelers\" text\n);\n\nQuestion: What is the average round for draft pick #49 from Notre Dame?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"1978_pittsburgh_steelers_draft_selection\" WHERE \"college\"='notre dame' AND \"pick_num\"='49';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1978_pittsburgh_steelers_draft_selection\" (\n \"round\" real,\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text,\n \"tenure_w_steelers\" text\n);\n\nQuestion: What college is draft pick #327 from?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"1978_pittsburgh_steelers_draft_selection\" WHERE \"pick_num\"='327';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1978_pittsburgh_steelers_draft_selection\" (\n \"round\" real,\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text,\n \"tenure_w_steelers\" text\n);\n\nQuestion: What college is pick number 268 from?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"1978_pittsburgh_steelers_draft_selection\" WHERE \"pick_num\"='268';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1978_pittsburgh_steelers_draft_selection\" (\n \"round\" real,\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text,\n \"tenure_w_steelers\" text\n);\n\nQuestion: What round pick was pick number 101 who plays defensive back?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"1978_pittsburgh_steelers_draft_selection\" WHERE \"position\"='defensive back' AND \"pick_num\"='101';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.