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 \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which stage has a Winner of lucien van impe?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"winner\"='lucien van impe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which Trofeo Fast Team has a Winner of alessandro paganessi?"
},
{
"role": "assistant",
"content": "SELECT \"trofeo_fast_team\" FROM \"classification_leadership_by_stage\" WHERE \"winner\"='alessandro paganessi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which General classification has a Stage of 7?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which Winner has a Trofeo Fast Team of metauro mobili-pinarello, and a General classification of giuseppe saronni?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership_by_stage\" WHERE \"trofeo_fast_team\"='metauro mobili-pinarello' AND \"general_classification\"='giuseppe saronni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What's the report for the mosport park circuit?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"circuit\"='mosport park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Who has the pole position for the n\u00fcrburgring circuit?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"circuit\"='n\u00fcrburgring';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: When was pedro rodr\u00edguez the winning driver?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"winning_driver\"='pedro rodr\u00edguez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What's the report for the mexican grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"race\"='mexican grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is nigel mansell's time/retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='nigel mansell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the away team at Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the home team when the visiting team is the Mavericks?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"november\" WHERE \"visitor\"='mavericks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_goalie_mask_coins\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: What was the average year for a coin that had a mintage smaller than 10,000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"nhl_goalie_mask_coins\" WHERE \"mintage\"<'10,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"akira\" text,\n \"atsushi_aoki\" text,\n \"black_tiger_v\" text,\n \"jado\" text,\n \"milano_collection_a_t\" text,\n \"prince_devitt\" text,\n \"tiger_mask_iv\" text\n);\n\nQuestion: What is he Atsushi Aoki when the Black Tiger V is ibushi (16:35)?"
},
{
"role": "assistant",
"content": "SELECT \"atsushi_aoki\" FROM \"2009\" WHERE \"black_tiger_v\"='ibushi (16:35)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"akira\" text,\n \"atsushi_aoki\" text,\n \"black_tiger_v\" text,\n \"jado\" text,\n \"milano_collection_a_t\" text,\n \"prince_devitt\" text,\n \"tiger_mask_iv\" text\n);\n\nQuestion: What is the Akira when Tiger Mask IV is Akira (10:05)?"
},
{
"role": "assistant",
"content": "SELECT \"akira\" FROM \"2009\" WHERE \"tiger_mask_iv\"='akira (10:05)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"akira\" text,\n \"atsushi_aoki\" text,\n \"black_tiger_v\" text,\n \"jado\" text,\n \"milano_collection_a_t\" text,\n \"prince_devitt\" text,\n \"tiger_mask_iv\" text\n);\n\nQuestion: What is the corresponding Akira when Milano Collection A.T is Milano (10:29)?"
},
{
"role": "assistant",
"content": "SELECT \"akira\" FROM \"2009\" WHERE \"milano_collection_a_t\"='milano (10:29)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"akira\" text,\n \"atsushi_aoki\" text,\n \"black_tiger_v\" text,\n \"jado\" text,\n \"milano_collection_a_t\" text,\n \"prince_devitt\" text,\n \"tiger_mask_iv\" text\n);\n\nQuestion: What is Block A when Prince Devitt is Devitt (9:53)?"
},
{
"role": "assistant",
"content": "SELECT \"block_a\" FROM \"2009\" WHERE \"prince_devitt\"='devitt (9:53)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"akira\" text,\n \"atsushi_aoki\" text,\n \"black_tiger_v\" text,\n \"jado\" text,\n \"milano_collection_a_t\" text,\n \"prince_devitt\" text,\n \"tiger_mask_iv\" text\n);\n\nQuestion: What is the Akira when Prince Devitt is Devitt (7:20)?"
},
{
"role": "assistant",
"content": "SELECT \"akira\" FROM \"2009\" WHERE \"prince_devitt\"='devitt (7:20)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"akira\" text,\n \"atsushi_aoki\" text,\n \"black_tiger_v\" text,\n \"jado\" text,\n \"milano_collection_a_t\" text,\n \"prince_devitt\" text,\n \"tiger_mask_iv\" text\n);\n\nQuestion: What is the Prince Devitt when Block A is Yamato?"
},
{
"role": "assistant",
"content": "SELECT \"prince_devitt\" FROM \"2009\" WHERE \"block_a\"='yamato';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_by_club\" (\n \"club\" text,\n \"premier_league\" text,\n \"championship_first_division\" text,\n \"league_one_second_division\" text,\n \"league_two_third_division\" text\n);\n\nQuestion: I want the league one/second division for club of millwall"
},
{
"role": "assistant",
"content": "SELECT \"league_one_second_division\" FROM \"winners_by_club\" WHERE \"club\"='millwall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the home team when they played carlton?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many points did the visiting team score at south melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Date has a Crowd that is larger than 18,000 with a Home team score of 14.13 (97)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"crowd\">'18,000' AND \"home_team_score\"='14.13 (97)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Date has an Away team score of 11.7 (73)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"away_team_score\"='11.7 (73)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the total Crowd number for the Away team of Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_4\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the team score when playing against home in geelong?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people watched when st kilda played at home?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_10\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when the crowd was larger than 41,451?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_22\" WHERE \"crowd\">'41,451';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team when the venue was Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_22\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size when the home team score was 8.11 (59)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_22\" WHERE \"home_team_score\"='8.11 (59)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"time\" text,\n \"attendance\" text\n);\n\nQuestion: I want to know the time which has attendance of 66,772"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"schedule\" WHERE \"attendance\"='66,772';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"time\" text,\n \"attendance\" text\n);\n\nQuestion: Name the opponent that has attendance of 76,965"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='76,965';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"time\" text,\n \"attendance\" text\n);\n\nQuestion: Tell me the week that has an attendance of 78,301"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"attendance\"='78,301';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"time\" text,\n \"attendance\" text\n);\n\nQuestion: I want to know the opponent that ha a week of 3"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many were in attendance on 14 April 2007?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"premier_league\" WHERE \"date\"='14 april 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the venue where there are more than 52,302 in attendance and the result is 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"premier_league\" WHERE \"attendance\">'52,302' AND \"result\"='2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is catcher Josh Donaldson's pick number?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"supplemental_first_round_selections\" WHERE \"position\"='catcher' AND \"player\"='josh donaldson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which players plays at Akron College?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_two\" WHERE \"college\"='akron';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college does the player jon hameister-ries play for?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_two\" WHERE \"player\"='jon hameister-ries';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"draft\" real,\n \"round\" real,\n \"pick\" real,\n \"nationality\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: What is the nationality of the player with a pick larger than 21 from the College of the Sequoias?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"selections\" WHERE \"pick\">21 AND \"college_high_school_club\"='college of the sequoias';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: I want the result for goals which has goals of deacon 6/6"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"challenge_cup\" WHERE \"goals\"='deacon 6/6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which competition was at wilderspool?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"challenge_cup\" WHERE \"venue\"='wilderspool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Tell me the venue for score of 82-0"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"challenge_cup\" WHERE \"score\"='82-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: I want the date with the venue of mcalpine stadium"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"challenge_cup\" WHERE \"venue\"='mcalpine stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Tell me the goals for score of 38-28"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"challenge_cup\" WHERE \"score\"='38-28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Tell me the least Grid with points more than 11 and drivers being s\u00e9bastien bourdais with laps less than 67"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"points\">11 AND \"driver\"='s\u00e9bastien bourdais' AND \"laps\"<67;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Name the most laps for grid more than 9 and the driver being jan heylen"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\">9 AND \"driver\"='jan heylen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"2009_democratic_primary\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"staten_island\" text,\n \"total\" real\n);\n\nQuestion: How many voted in queens for the canddiate with all write-in votes and 26 staten island votes?"
},
{
"role": "assistant",
"content": "SELECT \"queens\" FROM \"2009\" WHERE \"2009_democratic_primary\"='all write-in votes' AND \"staten_island\"='26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid when the laps were 24?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"laps\"=24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed Chris Amon's car?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"driver\"='chris amon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was Jack Brabham's highest grid when his laps were more than 90?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"driver\"='jack brabham' AND \"laps\">90;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was CHris Amon's highest lap when his grid was 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"driver\"='chris amon' AND \"grid\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did Hawthorn have their away match against North Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score at Richmond's away game against Footscray?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the away team score 14.4 (88)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_5\" WHERE \"away_team_score\"='14.4 (88)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the size of the crowd for the home team of Footscray?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_5\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Time/Retired for the car going 42 Laps?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"=42;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps for alexander wurz with a grid under 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"grid\"<12 AND \"driver\"='alexander wurz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest evening gown score a contestant with an average less than 8.23, an interview score of 8.11, and a swimsuit larger than 7.84 has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"evening_gown\") FROM \"preliminary_competition\" WHERE \"average\"<8.23 AND \"interview\"=8.11 AND \"swimsuit\">7.84;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the total interview score a contestant from Indiana with an average smaller than 8.3 has?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"interview\") FROM \"preliminary_competition\" WHERE \"state\"='indiana' AND \"average\"<8.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the highest swimsuit a contestant from Kansas with an average larger than 8.48, an interview higher than 8.58, and an evening gown higher than 8.82 has?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"average\">8.48 AND \"interview\">8.58 AND \"evening_gown\">8.82 AND \"state\"='kansas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the average interview score of a contestant from Louisiana with an evening gown smaller than 8.82?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"interview\") FROM \"preliminary_competition\" WHERE \"evening_gown\"<8.82 AND \"state\"='louisiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_halogens\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text,\n \"example\" text\n);\n\nQuestion: What prefix has Haloalkane as the chemical class?"
},
{
"role": "assistant",
"content": "SELECT \"prefix\" FROM \"groups_containing_halogens\" WHERE \"chemical_class\"='haloalkane';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_halogens\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text,\n \"example\" text\n);\n\nQuestion: Which example has rx as the formula?"
},
{
"role": "assistant",
"content": "SELECT \"example\" FROM \"groups_containing_halogens\" WHERE \"formula\"='rx';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_halogens\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text,\n \"example\" text\n);\n\nQuestion: Which chemical class uses the example Chloroethane (ethyl chloride)?"
},
{
"role": "assistant",
"content": "SELECT \"chemical_class\" FROM \"groups_containing_halogens\" WHERE \"example\"='chloroethane (ethyl chloride)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_halogens\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text,\n \"example\" text\n);\n\nQuestion: What prefix has Bromo as the group?"
},
{
"role": "assistant",
"content": "SELECT \"prefix\" FROM \"groups_containing_halogens\" WHERE \"group\"='bromo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_halogens\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text,\n \"example\" text\n);\n\nQuestion: What is the chemical class for ri?"
},
{
"role": "assistant",
"content": "SELECT \"chemical_class\" FROM \"groups_containing_halogens\" WHERE \"formula\"='ri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_halogens\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text,\n \"example\" text\n);\n\nQuestion: What prefix has chemical class Iodoalkane?"
},
{
"role": "assistant",
"content": "SELECT \"prefix\" FROM \"groups_containing_halogens\" WHERE \"chemical_class\"='iodoalkane';"
}
] |
[
{
"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 \"wins\" real\n);\n\nQuestion: What is the highest rank of the player with earnings of $6,715,649?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"earnings\"='6,715,649';"
}
] |
[
{
"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 \"wins\" real\n);\n\nQuestion: What is the rank of Lee Trevino, who had less than 27 wins?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"leaders\" WHERE \"player\"='lee trevino' AND \"wins\"<27;"
}
] |
[
{
"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 \"wins\" real\n);\n\nQuestion: Who is the player with more than $6,570,797 in earnings and less than 27 wins?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"leaders\" WHERE \"earnings\">'6,570,797' AND \"wins\"<27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2007_08\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What date did the show with a series larger than 40, production code smaller than 213, and a season number larger than 11 air?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"season_2_2007_08\" WHERE \"series_no\">40 AND \"production_code\"<213 AND \"season_no\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2007_08\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the series number 49 with a season larger than 4?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"season_2_2007_08\" WHERE \"season_no\">4 AND \"series_no\"=49;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_highest_grossing_bollywood_films\" (\n \"year\" real,\n \"movie\" text,\n \"record_held\" text,\n \"studio_s\" text,\n \"nett_gross\" real\n);\n\nQuestion: What was the latest gross 75,50,00,000?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"list_of_highest_grossing_bollywood_films\" WHERE \"nett_gross\"='75,50,00,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_highest_grossing_bollywood_films\" (\n \"year\" real,\n \"movie\" text,\n \"record_held\" text,\n \"studio_s\" text,\n \"nett_gross\" real\n);\n\nQuestion: What is the total count of net gross in 1957?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nett_gross\") FROM \"list_of_highest_grossing_bollywood_films\" WHERE \"year\"=1957;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"royal_bavaria\" (\n \"name\" text,\n \"title\" text,\n \"start_term\" real,\n \"end_term\" real,\n \"house\" text\n);\n\nQuestion: What is the total End term with a Title of prince regent of bavaria?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"end_term\") FROM \"royal_bavaria\" WHERE \"title\"='prince regent of bavaria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"royal_bavaria\" (\n \"name\" text,\n \"title\" text,\n \"start_term\" real,\n \"end_term\" real,\n \"house\" text\n);\n\nQuestion: What is the smallest End term with a Start term of 1913, and a Name of ludwig iii?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"end_term\") FROM \"royal_bavaria\" WHERE \"start_term\"=1913 AND \"name\"='ludwig iii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"royal_bavaria\" (\n \"name\" text,\n \"title\" text,\n \"start_term\" real,\n \"end_term\" real,\n \"house\" text\n);\n\nQuestion: Which Title has an 1825 end term?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"royal_bavaria\" WHERE \"end_term\"=1825;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"royal_bavaria\" (\n \"name\" text,\n \"title\" text,\n \"start_term\" real,\n \"end_term\" real,\n \"house\" text\n);\n\nQuestion: What is the average Start term with a 1912 end term?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"start_term\") FROM \"royal_bavaria\" WHERE \"end_term\"=1912;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What date were the high rebounds Evans (14)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"high_rebounds\"='evans (14)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: Which game has a high rebound of Evans (7) and a high assist of Evans, Ollie (3)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"playoffs\" WHERE \"high_rebounds\"='evans (7)' AND \"high_assists\"='evans, ollie (3)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sheffield_united_career\" (\n \"division\" text,\n \"league_apps_sub\" real,\n \"league_goals\" real,\n \"fa_cup_apps_sub\" text,\n \"fa_cup_goals\" real,\n \"fl_cup_apps_sub\" real,\n \"fl_cup_goals\" real,\n \"other_apps\" real,\n \"other_goals\" real,\n \"total_apps_sub\" text,\n \"total_goals\" real\n);\n\nQuestion: What division has the highest FA Cup Goals, but a Total Goal score less than 5, and a Total Apps of 52?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"fa_cup_goals\") FROM \"sheffield_united_career\" WHERE \"total_apps_sub\"='52' AND \"total_goals\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sheffield_united_career\" (\n \"division\" text,\n \"league_apps_sub\" real,\n \"league_goals\" real,\n \"fa_cup_apps_sub\" text,\n \"fa_cup_goals\" real,\n \"fl_cup_apps_sub\" real,\n \"fl_cup_goals\" real,\n \"other_apps\" real,\n \"other_goals\" real,\n \"total_apps_sub\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the average FL Cup Apps, with a FL Cup Goals greater than 0, but a Other Apps less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fl_cup_apps_sub\") FROM \"sheffield_united_career\" WHERE \"fl_cup_goals\">0 AND \"other_apps\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sheffield_united_career\" (\n \"division\" text,\n \"league_apps_sub\" real,\n \"league_goals\" real,\n \"fa_cup_apps_sub\" text,\n \"fa_cup_goals\" real,\n \"fl_cup_apps_sub\" real,\n \"fl_cup_goals\" real,\n \"other_apps\" real,\n \"other_goals\" real,\n \"total_apps_sub\" text,\n \"total_goals\" real\n);\n\nQuestion: What is Division One's total number of FL Cup Goals, with an Other Apps greater than 3, and a FA Cup Goals greater than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fl_cup_goals\") FROM \"sheffield_united_career\" WHERE \"division\"='one' AND \"other_apps\">3 AND \"fa_cup_goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sheffield_united_career\" (\n \"division\" text,\n \"league_apps_sub\" real,\n \"league_goals\" real,\n \"fa_cup_apps_sub\" text,\n \"fa_cup_goals\" real,\n \"fl_cup_apps_sub\" real,\n \"fl_cup_goals\" real,\n \"other_apps\" real,\n \"other_goals\" real,\n \"total_apps_sub\" text,\n \"total_goals\" real\n);\n\nQuestion: What is Division One's average Other Apps, with a League Goal less than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"other_apps\") FROM \"sheffield_united_career\" WHERE \"division\"='one' AND \"league_goals\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who plays at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"postseason_game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score against the indians after game 2?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"postseason_game_log\" WHERE \"game\">2 AND \"opponent\"='indians';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid for piers courage?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"driver\"='piers courage';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drove 53 laps?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"=53;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lap total for george eaton, with a grid under 17 retiring due to gearbox?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"time_retired\"='gearbox' AND \"driver\"='george eaton' AND \"grid\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps for denny hulme with under 4 on the grid?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"driver\"='denny hulme' AND \"grid\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the crowd when the home team scored 13.10 (88)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_5\" WHERE \"home_team_score\"='13.10 (88)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the sum of the crowd when the away team score was 12.11 (83)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_5\" WHERE \"away_team_score\"='12.11 (83)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the home team when there were more than 5,500 people in the crowd?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"crowd\">'5,500';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the sum of Crowd when Essendon was the home team?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_5\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score when North Melbourne was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"collaboration_singles\" (\n \"year\" real,\n \"u_s_hot_100\" text,\n \"u_s_r_b\" text,\n \"u_s_rap\" text,\n \"album\" text\n);\n\nQuestion: What is the U.S. Hot 100 chart number of the single off of the 2002 album west coast bad boyz, vol. 3: poppin' collars?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_hot_100\" FROM \"collaboration_singles\" WHERE \"year\"=2002 AND \"album\"='west coast bad boyz, vol. 3: poppin'' collars';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"collaboration_singles\" (\n \"year\" real,\n \"u_s_hot_100\" text,\n \"u_s_r_b\" text,\n \"u_s_rap\" text,\n \"album\" text\n);\n\nQuestion: What is the U.S. Rap chart number of the album west coast bad boyz, vol. 3: poppin' collars?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_rap\" FROM \"collaboration_singles\" WHERE \"album\"='west coast bad boyz, vol. 3: poppin'' collars';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: What is the top round for the baltimore bullets with a Pick larger than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"draft\" WHERE \"team\"='baltimore bullets' AND \"pick\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the away team when the home team scored 12.8 (80)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"home_team_score\"='12.8 (80)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the away team when the home team scored 9.10 (64)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"home_team_score\"='9.10 (64)';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.