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 \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"nominated_work\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What category has showest award for the category awards?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"award\"='showest award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"nominated_work\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What category has a year after 2004?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"year\">2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which Opponent had a Score of 6-3, 6-2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_5_2_3\" WHERE \"score\"='6-3, 6-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which Score had an Opponent of chris evert-lloyd?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_5_2_3\" WHERE \"opponent\"='chris evert-lloyd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which Surface had an Opponent of chris evert-lloyd?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_5_2_3\" WHERE \"opponent\"='chris evert-lloyd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which Surface had a Date of june 13, 1983?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_5_2_3\" WHERE \"date\"='june 13, 1983';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What was the highest attendance for a game where Geelong was the home team?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_21\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What was the away team score when the home team was the Brisbane Lions?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_21\" WHERE \"home_team\"='brisbane lions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: When did the home team score 23.13 (151)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_21\" WHERE \"home_team_score\"='23.13 (151)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"report\" text\n);\n\nQuestion: What was the largest attendance at the Telstra Dome, when the home team was the Western Bulldogs?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_21\" WHERE \"ground\"='telstra dome' AND \"home_team\"='western bulldogs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_final_statistics\" (\n \"rank\" real,\n \"airport\" text,\n \"code_iata_icao\" text,\n \"total_cargo_metric_tonnes\" real,\n \"pct_change\" text\n);\n\nQuestion: What is the full amount of Total Cargo (in Metric Tonnes) where the Code (IATA/ICAO) is pvg/zspd, and the rank is less than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_cargo_metric_tonnes\") FROM \"2010_final_statistics\" WHERE \"code_iata_icao\"='pvg/zspd' AND \"rank\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Date at memorial stadium \u2022 minneapolis, mn with an Attendance of 20,000, and a Result of w52-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"site\"='memorial stadium \u2022 minneapolis, mn' AND \"attendance\"='20,000' AND \"result\"='w52-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Opponent name at memorial stadium \u2022 minneapolis, mn on 10/20/1928?"
},
{
"role": "assistant",
"content": "SELECT \"opponentnum\" FROM \"schedule\" WHERE \"site\"='memorial stadium \u2022 minneapolis, mn' AND \"date\"='10/20/1928';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Attendance number when the Opponent was purdue?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponentnum\"='purdue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Site when the Result was w52-0?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"schedule\" WHERE \"result\"='w52-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Attendance on 11/10/1928?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='11/10/1928';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"winner\" text,\n \"score\" text,\n \"date\" text,\n \"venue\" text,\n \"crowd\" real\n);\n\nQuestion: Who was the Winner at Campbelltown Sports Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"results\" WHERE \"venue\"='campbelltown sports stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"winner\" text,\n \"score\" text,\n \"date\" text,\n \"venue\" text,\n \"crowd\" real\n);\n\nQuestion: When Sydney Roosters won with a Crown of more than 7,426, what was the Venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"winner\"='sydney roosters' AND \"crowd\">'7,426';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_and_draw_dates\" (\n \"phase\" text,\n \"round\" text,\n \"draw_date\" text,\n \"first_leg\" text,\n \"second_leg\" text\n);\n\nQuestion: What was the second leg score from the group stage on matchday 5?"
},
{
"role": "assistant",
"content": "SELECT \"second_leg\" FROM \"round_and_draw_dates\" WHERE \"phase\"='group stage' AND \"round\"='matchday 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_and_draw_dates\" (\n \"phase\" text,\n \"round\" text,\n \"draw_date\" text,\n \"first_leg\" text,\n \"second_leg\" text\n);\n\nQuestion: What was the draw date from the qualifying phase and a round of first qualifying round?"
},
{
"role": "assistant",
"content": "SELECT \"draw_date\" FROM \"round_and_draw_dates\" WHERE \"phase\"='qualifying' AND \"round\"='first qualifying round';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"statue\" text,\n \"liberator\" text,\n \"country\" text,\n \"year_erected\" text,\n \"artist\" text\n);\n\nQuestion: what year did enrique alciati make a statue"
},
{
"role": "assistant",
"content": "SELECT \"year_erected\" FROM \"see_also\" WHERE \"artist\"='enrique alciati';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"statue\" text,\n \"liberator\" text,\n \"country\" text,\n \"year_erected\" text,\n \"artist\" text\n);\n\nQuestion: what artist cam from uruguay"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"see_also\" WHERE \"country\"='uruguay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"urban_population_growth_pct\" (\n \"region_country\" text,\n \"1985_1990\" real,\n \"1990_1995\" real,\n \"1995_2000\" real,\n \"2000_2005\" real\n);\n\nQuestion: When 1990-1995 > 0.37, 2000-2005 of 1.37, what's the highest for 1995-2000?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1995_2000\") FROM \"urban_population_growth_pct\" WHERE \"1990_1995\">0.37 AND \"2000_2005\"=1.37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"urban_population_growth_pct\" (\n \"region_country\" text,\n \"1985_1990\" real,\n \"1990_1995\" real,\n \"1995_2000\" real,\n \"2000_2005\" real\n);\n\nQuestion: When 2000-2005 is smaller than 2.52, and 1990-1995 is less than 0.37, what's the total of 1995-2000?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1995_2000\") FROM \"urban_population_growth_pct\" WHERE \"2000_2005\"<2.52 AND \"1990_1995\"<0.37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"urban_population_growth_pct\" (\n \"region_country\" text,\n \"1985_1990\" real,\n \"1990_1995\" real,\n \"1995_2000\" real,\n \"2000_2005\" real\n);\n\nQuestion: What's China's highest 1985-1990 assuming a 2000-2005 larger than 3.08?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1985_1990\") FROM \"urban_population_growth_pct\" WHERE \"region_country\"='china' AND \"2000_2005\">3.08;"
}
] |
[
{
"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: What is the women's singles before 1965 with kaj lindfors ann-louise von essen being mixed doubles?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"past_winners\" WHERE \"year\"<1965 AND \"mixed_doubles\"='kaj lindfors ann-louise von essen';"
}
] |
[
{
"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: When did mika heinonen susanna dahlberg win mixed doubles?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"past_winners\" WHERE \"mixed_doubles\"='mika heinonen susanna dahlberg';"
}
] |
[
{
"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: How many years did pia pajunen nina sundberg win women's doubles?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"past_winners\" WHERE \"women_s_doubles\"='pia pajunen nina sundberg';"
}
] |
[
{
"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 women's singles in 1961?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"past_winners\" WHERE \"year\"=1961;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marc_zwiebler\" (\n \"outcome\" text,\n \"year\" text,\n \"venue\" text,\n \"last_opponent\" text,\n \"score\" text\n);\n\nQuestion: Score of 0\u20133 (11\u201321, 14\u201321) had what outcome?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"marc_zwiebler\" WHERE \"score\"='0\u20133 (11\u201321, 14\u201321)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marc_zwiebler\" (\n \"outcome\" text,\n \"year\" text,\n \"venue\" text,\n \"last_opponent\" text,\n \"score\" text\n);\n\nQuestion: Venue of thessaloniki (without participation) had what score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"marc_zwiebler\" WHERE \"venue\"='thessaloniki (without participation)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marc_zwiebler\" (\n \"outcome\" text,\n \"year\" text,\n \"venue\" text,\n \"last_opponent\" text,\n \"score\" text\n);\n\nQuestion: Outcome of 13, and a Year of 2007 happened in what venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"marc_zwiebler\" WHERE \"outcome\"='13' AND \"year\"='2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_i_comparison_of_selected_volcanic_\" (\n \"eruptions\" text,\n \"country\" text,\n \"location\" text,\n \"year\" real,\n \"volcanic_explosivity_index\" text,\n \"fatalities\" text\n);\n\nQuestion: Which Eruptions have a Location of pacific ring of fire, and a Volcanic Explosivity Index of 6, and a Country of peru?"
},
{
"role": "assistant",
"content": "SELECT \"eruptions\" FROM \"table_i_comparison_of_selected_volcanic_\" WHERE \"location\"='pacific ring of fire' AND \"volcanic_explosivity_index\"='6' AND \"country\"='peru';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_i_comparison_of_selected_volcanic_\" (\n \"eruptions\" text,\n \"country\" text,\n \"location\" text,\n \"year\" real,\n \"volcanic_explosivity_index\" text,\n \"fatalities\" text\n);\n\nQuestion: How many fatalities does Italy have?"
},
{
"role": "assistant",
"content": "SELECT \"fatalities\" FROM \"table_i_comparison_of_selected_volcanic_\" WHERE \"country\"='italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_i_comparison_of_selected_volcanic_\" (\n \"eruptions\" text,\n \"country\" text,\n \"location\" text,\n \"year\" real,\n \"volcanic_explosivity_index\" text,\n \"fatalities\" text\n);\n\nQuestion: How many years have a Location of pacific ring of fire, and Eruptions of pinatubo?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"table_i_comparison_of_selected_volcanic_\" WHERE \"location\"='pacific ring of fire' AND \"eruptions\"='pinatubo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3_liga\" (\n \"season\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"promotion_playoff\" text,\n \"standings\" text\n);\n\nQuestion: What is the Standings of Eintracht Braunschweig?"
},
{
"role": "assistant",
"content": "SELECT \"standings\" FROM \"3_liga\" WHERE \"champions\"='eintracht braunschweig';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Year larger than 2001 has what average points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"grand_prix_career_statistics\" WHERE \"year\">2001;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Team of Honda and a point total of 238 is what highest year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"grand_prix_career_statistics\" WHERE \"team\"='honda' AND \"points\"=238;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Wins of 0 involves what team?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"grand_prix_career_statistics\" WHERE \"wins\"=0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: what player has a pick of 5"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_1\" WHERE \"pick\"=5;"
}
] |
[
{
"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 District has a First elected of 1858, and a Result of retired republican gain, and an Incumbent of william millward?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"united_states_house_of_representatives_e\" WHERE \"first_elected\"=1858 AND \"result\"='retired republican gain' AND \"incumbent\"='william millward';"
}
] |
[
{
"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 District of pennsylvania 13?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"united_states_house_of_representatives_e\" WHERE \"district\"='pennsylvania 13';"
}
] |
[
{
"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 First elected is the lowest one that has an Incumbent of william stewart?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"united_states_house_of_representatives_e\" WHERE \"incumbent\"='william stewart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Who was the Player when College/Junior/Club Team (League) was regina pats (whl)?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='regina pats (whl)';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the date of the game with an attendance larger than 62,491?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\">'62,491';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance of the game on week 4?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rose_bowl_michigan_49_stanford_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many extra points are there that Herrnstein had with less than 2 touchdowns and less than 0 field goals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"extra_points\") FROM \"rose_bowl_michigan_49_stanford_0\" WHERE \"touchdowns\"<2 AND \"player\"='herrnstein' AND \"field_goals\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rose_bowl_michigan_49_stanford_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many touchdowns are there that has field goals less than 0 and 0 extra points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"touchdowns\") FROM \"rose_bowl_michigan_49_stanford_0\" WHERE \"extra_points\"=0 AND \"field_goals\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rose_bowl_michigan_49_stanford_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many field goals are there that have 8 touchdowns and more than 49 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"field_goals\") FROM \"rose_bowl_michigan_49_stanford_0\" WHERE \"touchdowns\"=8 AND \"points\">49;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rose_bowl_michigan_49_stanford_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What's the number of touchdowns that Snow made that had 0 field goals, more than 5 points, and more than 0 extra points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"touchdowns\") FROM \"rose_bowl_michigan_49_stanford_0\" WHERE \"points\">5 AND \"field_goals\"=0 AND \"player\"='snow' AND \"extra_points\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: For an IATA of MLE, what is the ICAO?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"iata\"='mle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: For an ICAO of VCCT, what is the IATA?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"icao\"='vcct';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which city has an ICAO of VCCJ?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"icao\"='vccj';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which ICAO is found in Vavuniya?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"city\"='vavuniya';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which country has Weerawila Airport?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"airport\"='weerawila airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which opponent has april 1 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 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 \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What opponent has tomko (1-1) as a loss?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='tomko (1-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 \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What opponent has 8-10 as the record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='8-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_chemistry\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text\n);\n\nQuestion: Whcih was the Class AAA in school year 2006-07?"
},
{
"role": "assistant",
"content": "SELECT \"class_aaa\" FROM \"individual_chemistry\" WHERE \"school_year\"='2006-07';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_chemistry\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text\n);\n\nQuestion: What team was class AA in years 1994-95?"
},
{
"role": "assistant",
"content": "SELECT \"class_aa\" FROM \"individual_chemistry\" WHERE \"school_year\"='1994-95';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_chemistry\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text\n);\n\nQuestion: Who was Class AA in School Year 1994-95?"
},
{
"role": "assistant",
"content": "SELECT \"class_aa\" FROM \"individual_chemistry\" WHERE \"school_year\"='1994-95';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What's the date of the game that has the Bulls as a visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"march\" WHERE \"visitor\"='bulls';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the average game number that took place after February 13 against the Toronto Maple Leafs and more than 47 points were scored?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"regular_season\" WHERE \"february\">13 AND \"opponent\"='toronto maple leafs' AND \"points\">47;"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent at the game at Sullivan Stadium before week 11?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<11 AND \"game_site\"='sullivan stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches_and_all_time_results\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: What is the years coached by the person with a win percentage of 0.667 and 380 losses?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"head_coaches_and_all_time_results\" WHERE \"pct\"=0.667 AND \"lost\"=380;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches_and_all_time_results\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: What is the average percent for the coach from 1905 and more than 7 losses?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pct\") FROM \"head_coaches_and_all_time_results\" WHERE \"years\"='1905' AND \"lost\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches_and_all_time_results\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: How many percentages have 20 losses and more than 1 season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pct\") FROM \"head_coaches_and_all_time_results\" WHERE \"lost\"=20 AND \"seasons\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What home has February 10 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='february 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What date has ny islanders as the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"visitor\"='ny islanders';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What score has February 10 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='february 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Name the course for 24 july"
},
{
"role": "assistant",
"content": "SELECT \"course\" FROM \"stage_results\" WHERE \"date\"='24 july';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Name the course for team time trial"
},
{
"role": "assistant",
"content": "SELECT \"course\" FROM \"stage_results\" WHERE \"type\"='team time trial';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: Name the winner for rest day for 13 july"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"course\"='rest day' AND \"date\"='13 july';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"elimination_no\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: Shawn Michaels entered the elimination chamber in what position?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"entered\") FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"wrestler\"='shawn michaels';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"elimination_no\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: Who Eliminated Kurt Angle?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated_by\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"wrestler\"='kurt angle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"elimination_no\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: Who Eliminated Kane?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated_by\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"wrestler\"='kane';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of all gold medals for Algeria when total medals is less than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"nation\"='algeria' AND \"total\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_urban_areas\" (\n \"urban_area\" text,\n \"country\" text,\n \"region\" text,\n \"population\" real,\n \"globalization_index\" text\n);\n\nQuestion: what is the population of Valencia, Spain?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population\") FROM \"major_urban_areas\" WHERE \"country\"='spain' AND \"urban_area\"='valencia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_feet_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: which year holds rank 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"tallest_buildings\" WHERE \"rank\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_feet_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: with name meridian condominiums what is number of floors?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"floors\") FROM \"tallest_buildings\" WHERE \"name\"='meridian condominiums';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_feet_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: with rank of 31 what is the year?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"tallest_buildings\" WHERE \"rank\"='31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the match against the visiting team, Toronto?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"january\" WHERE \"visitor\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who played the home team during the game on January 6?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"january\" WHERE \"date\"='january 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the cougars record during the game where Boston were the visitors?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"visitor\"='boston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What's the lowest Drawn that has a Lost that's less than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"group_2\" WHERE \"lost\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What's the total Lost with Games that's less than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"group_2\" WHERE \"games\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What's the total of Games with a Lost that's larger than 2, and has Points that's smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"group_2\" WHERE \"lost\">2 AND \"points\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What's the Lost average that has a Drawn less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"group_2\" WHERE \"drawn\"<0;"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What record has @ ottawa senators as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"opponent\"='@ ottawa senators';"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What game has 28 points, and tampa bay lightning as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"regular_season\" WHERE \"points\"=28 AND \"opponent\"='tampa bay lightning';"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the average points that have a December less than 6, with a game greater than 26?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"regular_season\" WHERE \"december\"<6 AND \"game\">26;"
}
] |
[
{
"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 \"series\" text\n);\n\nQuestion: Who was the opponent at the game with a loss of Sele (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='sele (0-1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Record of 42\u201316\u20138, and a March larger than 5 has what average points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"regular_season\" WHERE \"record\"='42\u201316\u20138' AND \"march\">5;"
}
] |
[
{
"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 \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Points smaller than 96, and a Record of 43\u201316\u20138 belongs to what game?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"regular_season\" WHERE \"points\"<96 AND \"record\"='43\u201316\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 \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Game smaller than 70, and a Record of 43\u201316\u20138 is what opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"game\"<70 AND \"record\"='43\u201316\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 \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Record of 44\u201318\u20138 involves which score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"record\"='44\u201318\u20138';"
}
] |
[
{
"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\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college is Kellen Davis from?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"player\"='kellen davis';"
}
] |
[
{
"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\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which round's position is according to official website?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"position\"='according to official website';"
}
] |
[
{
"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\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which position's round was 3 when pick was 70?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\"='3' AND \"pick\"='70';"
}
] |
[
{
"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\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which pick's round was 5 when Kellen Davis was a player?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"nfl_draft\" WHERE \"round\"='5' AND \"player\"='kellen davis';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.