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 \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Which Result has a First elected of 1876, and a District of south carolina 3?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1876 AND \"district\"='south carolina 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Which Result has a First elected larger than 1876, and an Incumbent of john s. richardson?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\">1876 AND \"incumbent\"='john s. richardson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Who is the incumbent that is a republican and first elected before 1864?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"ohio\" WHERE \"party\"='republican' AND \"first_elected\"<1864;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: What district is the democratic Francis C. Le Blond from?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"ohio\" WHERE \"party\"='democratic' AND \"incumbent\"='francis c. le blond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: In the Ohio 4 district, that is the first elected date that has a result of re-elected?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"first_elected\") FROM \"ohio\" WHERE \"result\"='re-elected' AND \"district\"='ohio 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ohio\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: What is the party in Ohio 6 District?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"ohio\" WHERE \"district\"='ohio 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: Which To par has a Year of 1994?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"winners\" WHERE \"year\"=1994;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: Which Country has a Margin of victory of 2 strokes?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"winners\" WHERE \"margin_of_victory\"='2 strokes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: Which Year is the lowest one that has a To par of \u20131?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"winners\" WHERE \"to_par\"='\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: Which Margin of victory has a Year larger than 1994, and a To par of \u201314, and a Score of 69-67-69-69=274?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"winners\" WHERE \"year\">1994 AND \"to_par\"='\u201314' AND \"score\"='69-67-69-69=274';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What was the record after the game at the Astrodome?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"location\"='astrodome';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What was the record after the game against the Houston Oilers?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"opponent\"='houston oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_3_balls_2_ropes\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What is the average total score of Belarus, which had an E score less than 8.2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"group_3_balls_2_ropes\" WHERE \"nation\"='belarus' AND \"e_score\"<8.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_3_balls_2_ropes\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total of the team with a T score greater than 8 and an E score less than 8.4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"group_3_balls_2_ropes\" WHERE \"t_score\">8 AND \"e_score\"<8.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_3_balls_2_ropes\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What is the T score of the team with an E score of 6.625?"
},
{
"role": "assistant",
"content": "SELECT \"t_score\" FROM \"group_3_balls_2_ropes\" WHERE \"e_score\"=6.625;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_3_balls_2_ropes\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total of Poland, which has an E score greater than 7.725?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"group_3_balls_2_ropes\" WHERE \"nation\"='poland' AND \"e_score\">7.725;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_3_balls_2_ropes\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total of the team with a T score less than 6.8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"group_3_balls_2_ropes\" WHERE \"t_score\"<6.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date has a competition of 2012 afc challenge cup, and dasarath rangasala stadium, kathmandu as the venue?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2012 afc challenge cup' AND \"venue\"='dasarath rangasala stadium, kathmandu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date\" text,\n \"venstre_v\" text,\n \"social_democrats_a\" text,\n \"danish_people_s_party_o\" text,\n \"socialist_people_s_party_f\" text,\n \"conservative_people_s_party_c\" text,\n \"social_liberal_party_b\" text,\n \"liberal_alliance_i\" text,\n \"red_green_alliance\" text,\n \"christian_democrats_k\" text,\n \"government\" text,\n \"opposition\" text\n);\n\nQuestion: Which Social Liberal Party has 4.5% of the Conservative People's Party?"
},
{
"role": "assistant",
"content": "SELECT \"social_liberal_party_b\" FROM \"opinion_polls\" WHERE \"conservative_people_s_party_c\"='4.5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date\" text,\n \"venstre_v\" text,\n \"social_democrats_a\" text,\n \"danish_people_s_party_o\" text,\n \"socialist_people_s_party_f\" text,\n \"conservative_people_s_party_c\" text,\n \"social_liberal_party_b\" text,\n \"liberal_alliance_i\" text,\n \"red_green_alliance\" text,\n \"christian_democrats_k\" text,\n \"government\" text,\n \"opposition\" text\n);\n\nQuestion: What opposition do 31.1% of Social Democrats have?"
},
{
"role": "assistant",
"content": "SELECT \"opposition\" FROM \"opinion_polls\" WHERE \"social_democrats_a\"='31.1%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date\" text,\n \"venstre_v\" text,\n \"social_democrats_a\" text,\n \"danish_people_s_party_o\" text,\n \"socialist_people_s_party_f\" text,\n \"conservative_people_s_party_c\" text,\n \"social_liberal_party_b\" text,\n \"liberal_alliance_i\" text,\n \"red_green_alliance\" text,\n \"christian_democrats_k\" text,\n \"government\" text,\n \"opposition\" text\n);\n\nQuestion: What is the Liberal Alliance that is backed by the Polling Firm, Capacent, and 13.0% of the Socialist People's Party?"
},
{
"role": "assistant",
"content": "SELECT \"liberal_alliance_i\" FROM \"opinion_polls\" WHERE \"polling_firm\"='capacent' AND \"socialist_people_s_party_f\"='13.0%';"
}
] |
[
{
"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: Which Position has a Round larger than 14, and a School/Club Team of north texas?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\">14 AND \"school_club_team\"='north texas';"
}
] |
[
{
"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: Which Round has a Player of anthony christnovich?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"player\"='anthony christnovich';"
}
] |
[
{
"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: Which Round is the lowest one that has a School/Club Team of virginia?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"school_club_team\"='virginia';"
}
] |
[
{
"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 name of the leading scorer on 2006-11-22?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"november\" WHERE \"date\"='2006-11-22';"
}
] |
[
{
"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 name of the leading scorer when the record was 9\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"november\" WHERE \"record\"='9\u20136';"
}
] |
[
{
"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 number of people in Attendance when Visitor was the warriors on 2006-11-04?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"november\" WHERE \"visitor\"='warriors' AND \"date\"='2006-11-04';"
}
] |
[
{
"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 team was the visitor when there were more than 16,182 people in attendance and the record was 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"november\" WHERE \"attendance\">'16,182' AND \"record\"='6\u20133';"
}
] |
[
{
"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 name of the visitor on 2006-11-04?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"november\" WHERE \"date\"='2006-11-04';"
}
] |
[
{
"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 name of the Leading scorer when the Score was 89\u2013102?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"november\" WHERE \"score\"='89\u2013102';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_by_population\" (\n \"rank\" real,\n \"town\" text,\n \"population\" real,\n \"year\" real,\n \"borough\" text,\n \"definition\" text\n);\n\nQuestion: Which Year is the highest one that has a Population larger than 13,012, and a Borough of richmondshire?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"settlements_by_population\" WHERE \"population\">'13,012' AND \"borough\"='richmondshire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_by_population\" (\n \"rank\" real,\n \"town\" text,\n \"population\" real,\n \"year\" real,\n \"borough\" text,\n \"definition\" text\n);\n\nQuestion: How many people live in Norton?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"settlements_by_population\" WHERE \"town\"='norton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_by_population\" (\n \"rank\" real,\n \"town\" text,\n \"population\" real,\n \"year\" real,\n \"borough\" text,\n \"definition\" text\n);\n\nQuestion: Which Year has a Borough of harrogate, and a Rank smaller than 6, and a Definition of civil parish?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"settlements_by_population\" WHERE \"borough\"='harrogate' AND \"rank\"<6 AND \"definition\"='civil parish';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_by_population\" (\n \"rank\" real,\n \"town\" text,\n \"population\" real,\n \"year\" real,\n \"borough\" text,\n \"definition\" text\n);\n\nQuestion: Which Definition has a Rank smaller than 12, and a Town of tadcaster?"
},
{
"role": "assistant",
"content": "SELECT \"definition\" FROM \"settlements_by_population\" WHERE \"rank\"<12 AND \"town\"='tadcaster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_by_population\" (\n \"rank\" real,\n \"town\" text,\n \"population\" real,\n \"year\" real,\n \"borough\" text,\n \"definition\" text\n);\n\nQuestion: Which Rank is the lowest one that has a Borough of richmondshire, and a Population larger than 8,178?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"settlements_by_population\" WHERE \"borough\"='richmondshire' AND \"population\">'8,178';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals did Bulgaria receive?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"nation\"='bulgaria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was Phil Mickelson's score to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"fourth_round\" WHERE \"player\"='phil mickelson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"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 name has an overall less than 268, and 1 as the round?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"<268 AND \"round\"=1;"
}
] |
[
{
"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: How many pick #'s have james britt as the name, with a round greater than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='james britt' AND \"round\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: what is the score on november 15"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='november 15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Which Wins is the highest one that has a Country of united states, and a Player of andy bean, and a Rank smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"leaders\" WHERE \"country\"='united states' AND \"player\"='andy bean' AND \"rank\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Which Country has a Rank of 5?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"leaders\" WHERE \"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 \"events\" real,\n \"wins\" real\n);\n\nQuestion: Which Earnings ($) is the lowest one that has a Rank smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"rank\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: What is the score of the game on September 13 when the Expos were the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='expos' AND \"date\"='september 13';"
}
] |
[
{
"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 \"save\" text\n);\n\nQuestion: Who was the opponent on the September 3 game?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='september 3';"
}
] |
[
{
"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 \"save\" text\n);\n\nQuestion: What is the save of the game on September 15?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"game_log\" WHERE \"date\"='september 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\" text\n);\n\nQuestion: Which Game site has a Week larger than 14?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"week\">14;"
}
] |
[
{
"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\" text\n);\n\nQuestion: Which Date has a Game site of jeppesen stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"game_site\"='jeppesen 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\" text\n);\n\nQuestion: Which Game site has 27,189 Attendances ?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"attendance\"='27,189';"
}
] |
[
{
"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\" text\n);\n\nQuestion: When is it has 15,557 Attendances?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='15,557';"
}
] |
[
{
"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: With an Overall less than 171, what is the Round pick of Lance Moon?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='lance moon' AND \"overall\"<171;"
}
] |
[
{
"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 draft Pick #10?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Rounds have a Defensive End Pick?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"position\"='defensive end';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time when Shinya Aoki was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='shinya aoki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which method was used in round 1 with a record of 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"record\"='1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Which rank has a team of Suzuki with under 16 points?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"team\"='suzuki' AND \"points\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Which class has a rank of 5th?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"rank\"='5th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Which team has a class of 500cc and rank of 16th?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"class\"='500cc' AND \"rank\"='16th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Which team has 16 points and ranks 14th?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"points\"=16 AND \"rank\"='14th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" text,\n \"worst_dancer_s\" text,\n \"worst_score\" text\n);\n\nQuestion: What is the dance that has priscilla presley is the worst dancer(s), and the worst score of 21?"
},
{
"role": "assistant",
"content": "SELECT \"dance\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"worst_dancer_s\"='priscilla presley' AND \"worst_score\"='21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" text,\n \"worst_dancer_s\" text,\n \"worst_score\" text\n);\n\nQuestion: What is the best score of the dance freestyle?"
},
{
"role": "assistant",
"content": "SELECT \"best_score\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"dance\"='freestyle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" text,\n \"worst_dancer_s\" text,\n \"worst_score\" text\n);\n\nQuestion: Which dance has the worst dancer(s) as marissa jaret winokur?"
},
{
"role": "assistant",
"content": "SELECT \"dance\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"worst_dancer_s\"='marissa jaret winokur';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have an Opponent of vancouver canucks?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"regular_season\" WHERE \"opponent\"='vancouver canucks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many Points have a Score of 3\u20130?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"regular_season\" WHERE \"score\"='3\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game has Points smaller than 10, and an October larger than 12, and an Opponent of @ washington capitals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"regular_season\" WHERE \"points\"<10 AND \"october\">12 AND \"opponent\"='@ washington capitals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has Points larger than 0, and a Score of 7\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"points\">0 AND \"score\"='7\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: On what date was the game more than 5?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Which series was on May 16?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"game_log\" WHERE \"date\"='may 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statewide\" (\n \"date\" text,\n \"jurisdiction\" text,\n \"ronald_reagan\" text,\n \"george_h_w_bush\" text,\n \"john_b_anderson\" text,\n \"howard_baker\" text,\n \"john_connally\" text,\n \"phil_crane\" text,\n \"bob_dole\" text\n);\n\nQuestion: Name the date for oregon jurisdiction"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"statewide\" WHERE \"jurisdiction\"='oregon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statewide\" (\n \"date\" text,\n \"jurisdiction\" text,\n \"ronald_reagan\" text,\n \"george_h_w_bush\" text,\n \"john_b_anderson\" text,\n \"howard_baker\" text,\n \"john_connally\" text,\n \"phil_crane\" text,\n \"bob_dole\" text\n);\n\nQuestion: Name the john b. anderson for ronald reagan of 43% and phil crane of 0%"
},
{
"role": "assistant",
"content": "SELECT \"john_b_anderson\" FROM \"statewide\" WHERE \"phil_crane\"='0%' AND \"ronald_reagan\"='43%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statewide\" (\n \"date\" text,\n \"jurisdiction\" text,\n \"ronald_reagan\" text,\n \"george_h_w_bush\" text,\n \"john_b_anderson\" text,\n \"howard_baker\" text,\n \"john_connally\" text,\n \"phil_crane\" text,\n \"bob_dole\" text\n);\n\nQuestion: Name the howard bake when bush had 66%"
},
{
"role": "assistant",
"content": "SELECT \"howard_baker\" FROM \"statewide\" WHERE \"george_h_w_bush\"='66%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statewide\" (\n \"date\" text,\n \"jurisdiction\" text,\n \"ronald_reagan\" text,\n \"george_h_w_bush\" text,\n \"john_b_anderson\" text,\n \"howard_baker\" text,\n \"john_connally\" text,\n \"phil_crane\" text,\n \"bob_dole\" text\n);\n\nQuestion: Name the george bush for ronald reagan of 43%"
},
{
"role": "assistant",
"content": "SELECT \"george_h_w_bush\" FROM \"statewide\" WHERE \"ronald_reagan\"='43%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statewide\" (\n \"date\" text,\n \"jurisdiction\" text,\n \"ronald_reagan\" text,\n \"george_h_w_bush\" text,\n \"john_b_anderson\" text,\n \"howard_baker\" text,\n \"john_connally\" text,\n \"phil_crane\" text,\n \"bob_dole\" text\n);\n\nQuestion: Name the howard baker for ronald reagan of 72%"
},
{
"role": "assistant",
"content": "SELECT \"howard_baker\" FROM \"statewide\" WHERE \"ronald_reagan\"='72%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"competition\" text,\n \"caps\" real,\n \"goals\" real\n);\n\nQuestion: What is the sum of goals for the 2004/05 Season?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals\") FROM \"references\" WHERE \"season\"='2004/05';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"competition\" text,\n \"caps\" real,\n \"goals\" real\n);\n\nQuestion: What is the lowest caps for the Club of SBV Excelsior?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"caps\") FROM \"references\" WHERE \"club\"='sbv excelsior';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"competition\" text,\n \"caps\" real,\n \"goals\" real\n);\n\nQuestion: Which season has Caps lower than 36 for the Club of NAC Breda?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"references\" WHERE \"caps\"<36 AND \"club\"='nac breda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_4_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Opponents in the final have a Partner of daniella dominikovic?"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_the_final\" FROM \"doubles_11_4_7\" WHERE \"partner\"='daniella dominikovic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_4_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Date has a Partner of daniella dominikovic?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_11_4_7\" WHERE \"partner\"='daniella dominikovic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_4_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Partner of pemra \u00f6zgen?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_11_4_7\" WHERE \"partner\"='pemra \u00f6zgen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_4_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Date has Opponents in the final of valeria casillo lilly raffa?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_11_4_7\" WHERE \"opponents_in_the_final\"='valeria casillo lilly raffa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_4_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Date has a Partner of daniella dominikovic?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_11_4_7\" WHERE \"partner\"='daniella dominikovic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"nationality\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Nationality of england, and a Matches smaller than 510, and a Lost of 4, and a Win % smaller than 28.6 had what lowest drawn?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"managers\" WHERE \"nationality\"='england' AND \"matches\"<510 AND \"lost\"=4 AND \"win_pct\"<28.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"nationality\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Win % larger than 47.1, and a Matches smaller than 145 had what lowest lost?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"managers\" WHERE \"win_pct\">47.1 AND \"matches\"<145;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"nationality\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Matches of 15, and a Win % smaller than 20 had what highest lost?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"managers\" WHERE \"matches\"=15 AND \"win_pct\"<20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"nationality\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Nationality of england, and a Lost larger than 39, and a Win % of 28.7, and a Drawn smaller than 37 had what sum of matches?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"matches\") FROM \"managers\" WHERE \"nationality\"='england' AND \"lost\">39 AND \"win_pct\"=28.7 AND \"drawn\"<37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"nationality\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Drawn smaller than 24, and a Lost smaller than 17, and a Win % smaller than 31.25 had how many total number of matches?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"matches\") FROM \"managers\" WHERE \"drawn\"<24 AND \"lost\"<17 AND \"win_pct\"<31.25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managers\" (\n \"nationality\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Lost of 18 had what sum of win %?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"win_pct\") FROM \"managers\" WHERE \"lost\"=18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When was the score 5-31?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='5-31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixteenth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the second leg that has kk bosna?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"sixteenth_finals\" WHERE \"team_num1\"='kk bosna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixteenth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg that has hapoel jerusalem?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"sixteenth_finals\" WHERE \"team_num1\"='hapoel jerusalem';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixteenth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which 1st leg that has hemofarm?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"sixteenth_finals\" WHERE \"team_num1\"='hemofarm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixteenth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: WHich Team#1 has 70 - 59 as a 1st leg?"
},
{
"role": "assistant",
"content": "SELECT \"team_num1\" FROM \"sixteenth_finals\" WHERE \"1st_leg\"='70 - 59';"
}
] |
[
{
"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: Who averaged 201.3 yards passing per game?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"passing\" WHERE \"avg_g\"=201.3;"
}
] |
[
{
"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: How many players had an Att-Cmp-Int of 143\u2013269\u201316, and an efficiency of less than 116.9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"avg_g\") FROM \"passing\" WHERE \"att_cmp_int\"='143\u2013269\u201316' AND \"effic\"<116.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 for the player with a efficiency of 117.4?"
},
{
"role": "assistant",
"content": "SELECT \"att_cmp_int\" FROM \"passing\" WHERE \"effic\"=117.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: How many legs were won by the player who had less than 84 100+, less than 14 legs lost, and less than 3 played?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"legs_won\") FROM \"statistics\" WHERE \"100\"<84 AND \"legs_lost\"<14 AND \"played\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: What is the total number of legs lost of the player with a high checkout less than 76 and less than 3 played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"legs_lost\") FROM \"statistics\" WHERE \"high_checkout\"<76 AND \"played\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: What is the number played of the player with 7 180s and a 140+ greater than 28?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"statistics\" WHERE \"180s\"=7 AND \"140\">28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: What is the number of legs lost of the player with more than 8 legs won, 4 played, less than 6 180s, and a 100+ greater than 46?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"legs_lost\") FROM \"statistics\" WHERE \"legs_won\">8 AND \"played\"=4 AND \"180s\"<6 AND \"100\">46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: What is the average number of legs won of the player with a high checkout greater than 96, more than 5 played, and a smaller than 95.61 3-dart average?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"legs_won\") FROM \"statistics\" WHERE \"high_checkout\">96 AND \"played\">5 AND \"3_dart_average\"<95.61;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.