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 \"1980_packers_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the athlete who was picked before round 9, had an overall draft pick after number 143 and plays the position of db?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1980_packers_draft_selections\" WHERE \"round\"<9 AND \"overall\">143 AND \"position\"='db';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest round of the player with an overall of 152?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"=152;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average round of the defensive back player with a pick # greater than 5 and an overall less than 152?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">5 AND \"position\"='defensive back' AND \"overall\"<152;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average overall of John Ayres, who had a pick # greater than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='john ayres' AND \"pick_num\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the name of the player with a pick # less than 5 and an overall of 284?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"<5 AND \"overall\"=284;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average overall of Ken Whisenhunt, who has a pick # of 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"=5 AND \"name\"='ken whisenhunt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest pick # of John Ayres?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='john ayres';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"last_match\" text,\n \"replaced_by\" text\n);\n\nQuestion: What is the name of team with Palmeiras 4-2 portuguesa as the last match?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"last_match\"='palmeiras 4-2 portuguesa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"last_match\" text,\n \"replaced_by\" text\n);\n\nQuestion: What was the manner of departure replaced by tita?"
},
{
"role": "assistant",
"content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"replaced_by\"='tita';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"last_match\" text,\n \"replaced_by\" text\n);\n\nQuestion: What is the name of the last match that had a sacked manner of departure and a geninho outgoing manner?"
},
{
"role": "assistant",
"content": "SELECT \"last_match\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='sacked' AND \"outgoing_manager\"='geninho';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"last_match\" text,\n \"replaced_by\" text\n);\n\nQuestion: What is the last match with a vacancy date of round 2 and Ney Franco as outgoing manager?"
},
{
"role": "assistant",
"content": "SELECT \"last_match\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='round 2' AND \"outgoing_manager\"='ney franco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"last_match\" text,\n \"replaced_by\" text\n);\n\nQuestion: What is the last match with a resigned manner of departure and a round 1 date of vacancy?"
},
{
"role": "assistant",
"content": "SELECT \"last_match\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='resigned' AND \"date_of_vacancy\"='round 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What was the issue date for the single with a Volume:Issue of 47:8-9?"
},
{
"role": "assistant",
"content": "SELECT \"issue_date_s\" FROM \"see_also\" WHERE \"volume_issue\"='47:8-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp_int\" text,\n \"avg_g\" real\n);\n\nQuestion: What is the highest effic with an avg/g of 91.9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"effic\") FROM \"passing\" WHERE \"avg_g\"=91.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp_int\" text,\n \"avg_g\" real\n);\n\nQuestion: What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0?"
},
{
"role": "assistant",
"content": "SELECT \"att_cmp_int\" FROM \"passing\" WHERE \"effic\"<117.88 AND \"gp_gs\"='10-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp_int\" text,\n \"avg_g\" real\n);\n\nQuestion: What is the sum avg/g with an effic of 858.4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"avg_g\") FROM \"passing\" WHERE \"effic\"=858.4;"
}
] |
[
{
"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 \"county\" text\n);\n\nQuestion: What is the mascot for the school in 32 Hendricks County?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='32 hendricks';"
}
] |
[
{
"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 \"county\" text\n);\n\nQuestion: What is the mascot for the school with a student body larger than 2,191 in Noblesville?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\">'2,191' AND \"school\"='noblesville';"
}
] |
[
{
"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 \"county\" text\n);\n\nQuestion: Where is Lafayette T. Jefferson School in 79 Tippecanoe county?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='79 tippecanoe' AND \"school\"='lafayette t. jefferson';"
}
] |
[
{
"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 \"county\" text\n);\n\nQuestion: Where is the school with Royals as their mascot?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='royals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game on February 12?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='february 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game on February 29?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='february 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Where was the home team in the game played against Chicago?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"visitor\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fcs_regional_championship_games\" (\n \"season\" real,\n \"game\" text,\n \"record\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which Season has a Game of fcs midwest region, and a Score of 40-33?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"fcs_regional_championship_games\" WHERE \"game\"='fcs midwest region' AND \"score\"='40-33';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fcs_regional_championship_games\" (\n \"season\" real,\n \"game\" text,\n \"record\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which Game has a Result of win, and an Opponent of new hampshire, and a Season smaller than 2008?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"fcs_regional_championship_games\" WHERE \"result\"='win' AND \"opponent\"='new hampshire' AND \"season\"<2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fcs_regional_championship_games\" (\n \"season\" real,\n \"game\" text,\n \"record\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which Season has a Score of 39-27?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"fcs_regional_championship_games\" WHERE \"score\"='39-27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What result has a goal of 5?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\"=5;"
}
] |
[
{
"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's the record on May 25?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What's greatest attendance on May 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"date\"='may 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 \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which January has a Record of 28\u201314\u20138?"
},
{
"role": "assistant",
"content": "SELECT \"january\" FROM \"regular_season\" WHERE \"record\"='28\u201314\u20138';"
}
] |
[
{
"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 \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points is the highest one that has a Game smaller than 43, and a January larger than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"regular_season\" WHERE \"game\"<43 AND \"january\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the mean number of wins for the norton team in 1966, when there are 8 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='norton' AND \"year\"=1966 AND \"points\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the most recent year for the ajs team when there are fewer than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='ajs' AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the smallest point amount for years prior to 1958 when the class is 350cc?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"year\"<1958 AND \"class\"='350cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"points\"<5 AND \"class\"='500cc' AND \"team\"='norton' AND \"year\">1955;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ftops_main_event_winners\" (\n \"series\" text,\n \"date\" text,\n \"entrants\" real,\n \"winner\" text,\n \"first_prize\" text\n);\n\nQuestion: What was the first prize for the FTOPS XIII series with more than 5,291 entrants?"
},
{
"role": "assistant",
"content": "SELECT \"first_prize\" FROM \"ftops_main_event_winners\" WHERE \"entrants\">'5,291' AND \"series\"='ftops xiii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ftops_main_event_winners\" (\n \"series\" text,\n \"date\" text,\n \"entrants\" real,\n \"winner\" text,\n \"first_prize\" text\n);\n\nQuestion: When was the game that had a first prize of $161,480?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"ftops_main_event_winners\" WHERE \"first_prize\"='$161,480';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ftops_main_event_winners\" (\n \"series\" text,\n \"date\" text,\n \"entrants\" real,\n \"winner\" text,\n \"first_prize\" text\n);\n\nQuestion: Who won on May 2011?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"ftops_main_event_winners\" WHERE \"date\"='may 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is the general classification with a 13 stage?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"stage\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is teh stage with Daniele Bennati as the points classification and Giovanni VIsconti as the general classification?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership\" WHERE \"points_classification\"='daniele bennati' AND \"general_classification\"='giovanni visconti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is the general classification of the stage 3 with Daniele Bennati as the points classification and Morris Possoni as the young rider classification."
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"points_classification\"='daniele bennati' AND \"young_rider_classification\"='morris possoni' AND \"stage\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is the general classification with riccardo ricc\u00f2 as the young rider classification?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"young_rider_classification\"='riccardo ricc\u00f2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is the point classification with chris anker s\u00f8rensen as the young rider classification and Christian vande velde as the general classification?"
},
{
"role": "assistant",
"content": "SELECT \"points_classification\" FROM \"classification_leadership\" WHERE \"young_rider_classification\"='chris anker s\u00f8rensen' AND \"general_classification\"='christian vande velde';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is the point classification of stage 15?"
},
{
"role": "assistant",
"content": "SELECT \"points_classification\" FROM \"classification_leadership\" WHERE \"stage\"='15';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: what week number was at memorial stadium?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"game_site\"='memorial stadium';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: before week 12 what was the attendance on 1983-11-21?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"date\"='1983-11-21' AND \"week\"<12;"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: on week 16, what was the lowest attendance?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the women's doubles when andrey antropov won the men's singles and marina yakusheva won the womens' singles?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"men_s_singles\"='andrey antropov' AND \"women_s_singles\"='marina yakusheva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_event\" (\n \"year\" real,\n \"date\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: At what venue is the margin of victory 7 strokes?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"lpga_event\" WHERE \"margin_of_victory\"='7 strokes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_event\" (\n \"year\" real,\n \"date\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What was the purse when Sherri Steinhauer was champion at Woburn Golf and Country Club?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"purse\") FROM \"lpga_event\" WHERE \"champion\"='sherri steinhauer' AND \"venue\"='woburn golf and country club';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_team\" (\n \"exit_date\" text,\n \"pos\" text,\n \"player\" text,\n \"to_club\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the exit date of the player who transferred to Cardiff City?"
},
{
"role": "assistant",
"content": "SELECT \"exit_date\" FROM \"first_team\" WHERE \"to_club\"='cardiff city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_team\" (\n \"exit_date\" text,\n \"pos\" text,\n \"player\" text,\n \"to_club\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the exit date of the player who transferred to Portsmouth?"
},
{
"role": "assistant",
"content": "SELECT \"exit_date\" FROM \"first_team\" WHERE \"to_club\"='portsmouth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_team\" (\n \"exit_date\" text,\n \"pos\" text,\n \"player\" text,\n \"to_club\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which player has a position of FW?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_team\" WHERE \"pos\"='fw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: Which Frequency MHz has an ERP W larger than 4, and a Call sign of w218ap?"
},
{
"role": "assistant",
"content": "SELECT \"frequency_m_hz\" FROM \"repeaters\" WHERE \"erp_w\">4 AND \"call_sign\"='w218ap';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: Which City of license has a Frequency MHz of 91.5 fm?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"repeaters\" WHERE \"frequency_m_hz\"='91.5 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: Which City of license has a Call sign of w220ba?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"repeaters\" WHERE \"call_sign\"='w220ba';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"fcc_info\" text\n);\n\nQuestion: Which ERP W has a Frequency MHz of 89.3 fm?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"erp_w\") FROM \"repeaters\" WHERE \"frequency_m_hz\"='89.3 fm';"
}
] |
[
{
"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: How many wins does a player who have $7,188,408 earnings with lower than rank 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"leaders\" WHERE \"earnings\"='7,188,408' AND \"rank\">5;"
}
] |
[
{
"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: How many wins does Greg Norman have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"player\"='greg norman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won_by_2_or_more_goals_difference\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest number played with a position of 6 and less than 1 draw?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"position\"=6 AND \"drawn\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won_by_2_or_more_goals_difference\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest against value for Palmeiras and position less than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"team\"='palmeiras' AND \"position\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won_by_2_or_more_goals_difference\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number played with more than 2 lost for Palmeiras and less than 1 draw?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"played\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"lost\">2 AND \"team\"='palmeiras' AND \"drawn\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won_by_2_or_more_goals_difference\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average number lost when the against value is less than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"against\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"won_by_2_or_more_goals_difference\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many values for a win by 2 or more goals correspond to a difference of 2, more than 9 points, and the America-RJ team when more than 7 are played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"won_by_2_or_more_goals_difference\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"difference\"='2' AND \"points\">9 AND \"team\"='america-rj' AND \"played\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_structure_of_the_population_in_\" (\n \"year_of_census\" real,\n \"total\" real,\n \"croats\" text,\n \"serbs\" text,\n \"others\" text\n);\n\nQuestion: What is the average total of the census after 1971 with 10,412 (32.88%) Serbs?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"national_structure_of_the_population_in_\" WHERE \"year_of_census\">1971 AND \"serbs\"='10,412 (32.88%)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: what is the school that hosts jim goodman"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"nfl_draft\" WHERE \"player\"='jim goodman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponen\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Date of january 2, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_6\" WHERE \"date\"='january 2, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponen\" text,\n \"score\" text\n);\n\nQuestion: Which tournament happened on september 25, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_6\" WHERE \"date\"='september 25, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponen\" text,\n \"score\" text\n);\n\nQuestion: When did jo\u00e3o souza play?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_6\" WHERE \"opponen\"='jo\u00e3o souza';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponen\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Score of 7\u20135, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_6\" WHERE \"score\"='7\u20135, 6\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_nfl_draft_selections\" (\n \"player\" text,\n \"position\" text,\n \"overall_pick\" real,\n \"round\" text,\n \"nfl_draft\" real,\n \"franchise\" text\n);\n\nQuestion: What is the highest NFL Draft that has jeff robinson as the player, with an overall pick less than 98?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"nfl_draft\") FROM \"top_nfl_draft_selections\" WHERE \"player\"='jeff robinson' AND \"overall_pick\"<98;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_nfl_draft_selections\" (\n \"player\" text,\n \"position\" text,\n \"overall_pick\" real,\n \"round\" text,\n \"nfl_draft\" real,\n \"franchise\" text\n);\n\nQuestion: What position has 1958 as the NFL Draft, and jerry kramer as the player?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"top_nfl_draft_selections\" WHERE \"nfl_draft\"=1958 AND \"player\"='jerry kramer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_nfl_draft_selections\" (\n \"player\" text,\n \"position\" text,\n \"overall_pick\" real,\n \"round\" text,\n \"nfl_draft\" real,\n \"franchise\" text\n);\n\nQuestion: What is the highest overall pick that has c as the position, with an NFL Draft greater than 1977?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall_pick\") FROM \"top_nfl_draft_selections\" WHERE \"position\"='c' AND \"nfl_draft\">1977;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mls_regular_season\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the score at Spartan Stadium when San Jose was the Home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"mls_regular_season\" WHERE \"home_team\"='san jose' AND \"venue\"='spartan stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mls_regular_season\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: Where was the game on September 11, 2004?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"mls_regular_season\" WHERE \"date\"='september 11, 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mls_regular_season\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: Who was the home team on September 20, 1998 at Spartan Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"mls_regular_season\" WHERE \"venue\"='spartan stadium' AND \"date\"='september 20, 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What method has a round less than 3, and 3:36 as the time?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"time\"='3:36';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What method has randy couture as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='randy couture';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"counties\" (\n \"county\" text,\n \"population\" real,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text\n);\n\nQuestion: What is the median household income where the per capita is $28,789?"
},
{
"role": "assistant",
"content": "SELECT \"median_household_income\" FROM \"counties\" WHERE \"per_capita_income\"='$28,789';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"counties\" (\n \"county\" text,\n \"population\" real,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text\n);\n\nQuestion: What is the median income for a family whose per capita income is $18,296?"
},
{
"role": "assistant",
"content": "SELECT \"median_family_income\" FROM \"counties\" WHERE \"per_capita_income\"='$18,296';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"dish\" text,\n \"callsign\" text,\n \"network\" text,\n \"resolution\" text,\n \"city_of_license\" text,\n \"official_website\" text\n);\n\nQuestion: What is the resolution of the network Canal de las Estrellas?"
},
{
"role": "assistant",
"content": "SELECT \"resolution\" FROM \"television\" WHERE \"network\"='canal de las estrellas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"dish\" text,\n \"callsign\" text,\n \"network\" text,\n \"resolution\" text,\n \"city_of_license\" text,\n \"official_website\" text\n);\n\nQuestion: What is the resolution of the network Carismatv?"
},
{
"role": "assistant",
"content": "SELECT \"resolution\" FROM \"television\" WHERE \"network\"='carismatv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"dish\" text,\n \"callsign\" text,\n \"network\" text,\n \"resolution\" text,\n \"city_of_license\" text,\n \"official_website\" text\n);\n\nQuestion: Which dish belongs to the network that has the official website of ksat.com?"
},
{
"role": "assistant",
"content": "SELECT \"dish\" FROM \"television\" WHERE \"official_website\"='ksat.com';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"dish\" text,\n \"callsign\" text,\n \"network\" text,\n \"resolution\" text,\n \"city_of_license\" text,\n \"official_website\" text\n);\n\nQuestion: In which city is the network latv licensed?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"television\" WHERE \"network\"='latv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"dish\" text,\n \"callsign\" text,\n \"network\" text,\n \"resolution\" text,\n \"city_of_license\" text,\n \"official_website\" text\n);\n\nQuestion: In which city is the network with the callsign kgns-dt3 licensed?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"television\" WHERE \"callsign\"='kgns-dt3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_braathens_aircraft\" (\n \"manufacturer\" text,\n \"model\" text,\n \"quantity\" real,\n \"introduced\" real,\n \"retired\" real\n);\n\nQuestion: How many in the introduced section had Fokker as a manufacturer, a quantity of 5, and retired later than 1999?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"introduced\") FROM \"list_of_braathens_aircraft\" WHERE \"manufacturer\"='fokker' AND \"quantity\"=5 AND \"retired\">1999;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_braathens_aircraft\" (\n \"manufacturer\" text,\n \"model\" text,\n \"quantity\" real,\n \"introduced\" real,\n \"retired\" real\n);\n\nQuestion: What is the total number of quantity when the introductory year was 1984?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"quantity\") FROM \"list_of_braathens_aircraft\" WHERE \"introduced\"=1984;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_braathens_aircraft\" (\n \"manufacturer\" text,\n \"model\" text,\n \"quantity\" real,\n \"introduced\" real,\n \"retired\" real\n);\n\nQuestion: How many in the introduced segment retired later than 1994 and had Fokker as a manufacturer?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"introduced\") FROM \"list_of_braathens_aircraft\" WHERE \"retired\">1994 AND \"manufacturer\"='fokker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_braathens_aircraft\" (\n \"manufacturer\" text,\n \"model\" text,\n \"quantity\" real,\n \"introduced\" real,\n \"retired\" real\n);\n\nQuestion: How many in the quantity section had Fokker as a manufacturer and retired later than 1999?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"quantity\") FROM \"list_of_braathens_aircraft\" WHERE \"manufacturer\"='fokker' AND \"retired\">1999;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mano_parejas\" (\n \"year\" text,\n \"champion\" text,\n \"subchampion\" text,\n \"scoreboard\" text,\n \"fronton\" text\n);\n\nQuestion: Which Championship has a Scoreboard that is 22-14?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"mano_parejas\" WHERE \"scoreboard\"='22-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skyline\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors_stories\" real,\n \"year_completed\" real\n);\n\nQuestion: What year was the building with a top 3 rank and a height of 274 (84) ft (m) completed?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_completed\") FROM \"skyline\" WHERE \"rank\"<3 AND \"height_ft_m\"='274 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skyline\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors_stories\" real,\n \"year_completed\" real\n);\n\nQuestion: How many floors are in the 274 (84) ft (m) building that is ranked number 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"floors_stories\") FROM \"skyline\" WHERE \"height_ft_m\"='274 (84)' AND \"rank\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"skyline\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors_stories\" real,\n \"year_completed\" real\n);\n\nQuestion: Which is the highest ranked building with more than 15 floors?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"skyline\" WHERE \"floors_stories\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the highest points scored for the team with a position larger than 5, who had less than 4 wins and more than 8 draws?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"scored\") FROM \"torneo_apertura\" WHERE \"position\">5 AND \"wins\"<4 AND \"draws\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the average number conceded for hte team that had less than 19 points, played more than 18 games and had a position less than 10?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"conceded\") FROM \"torneo_apertura\" WHERE \"points\"<19 AND \"position\"<10 AND \"played\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What was the sum of the draws for the team that had 11 wins, less than 38 points, and a position smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draws\") FROM \"torneo_apertura\" WHERE \"position\"<4 AND \"wins\"=11 AND \"points\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What was the lowest number of wins for the team that scored more than 14 points and had a position of 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"torneo_apertura\" WHERE \"position\"=7 AND \"scored\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the total number scored for the team that had 19 points and a position larger than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scored\") FROM \"torneo_apertura\" WHERE \"position\">4 AND \"points\"=19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest number conceded for the team that had less than 8 wins, scored 21, and had less than 23 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"conceded\") FROM \"torneo_apertura\" WHERE \"wins\"<8 AND \"scored\"=21 AND \"points\"<23;"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Which Date has a Result of l 14\u201313?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 14\u201313';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.