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 \"winter_1997_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: WHAT IS THE 3:30PM WITH ANOTHER WORLD AT 2:00PM?" }, { "role": "assistant", "content": "SELECT \"3_30_pm\" FROM \"winter_1997_1998\" WHERE \"2_00_pm\"='another world';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What is Award, when Result is \"Nominated\", and when Film is \"Sankranthi\"?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards\" WHERE \"result\"='nominated' AND \"film\"='sankranthi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What is Award, when Category is \"Best Actor\", and when Year is less than 1988?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards\" WHERE \"category\"='best actor' AND \"year\"<1988;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What is the total number of Year, when Award is \"Vamsi Berkley Award\", and when Category is \"Best Actor\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"awards\" WHERE \"award\"='vamsi berkley award' AND \"category\"='best actor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"film\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Film is \"Dharma Chakram\", and when Award is \"Nandi Award for Best Actor\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards\" WHERE \"film\"='dharma chakram' AND \"award\"='nandi award for best actor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is Opponent, when Date is \"Dec 8\"?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"date\"='dec 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Date is \"Nov 28\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"date\"='nov 28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when Score is \"80-79\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"score\"='80-79';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Opponent is \"New York Knicks\"?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"opponent\"='new york knicks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Opponent is \"@ New York Knicks\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"opponent\"='@ new york knicks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is Result, when Opponent is \"Rochester Royals\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"opponent\"='rochester royals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"st_mirren_scorer_s\" text\n);\n\nQuestion: What was the Result at Strathclyde Homes Stadium?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"friendlies\" WHERE \"venue\"='strathclyde homes stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Name the Score of spain?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round\" WHERE \"country\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which Country has a To par of \u22122? Question 2" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"first_round\" WHERE \"to_par\"='\u22122';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which Place has a To par of \u22121 and don pooley?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"first_round\" WHERE \"to_par\"='\u22121' AND \"player\"='don pooley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is week 15's result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=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 \"attendance\" real\n);\n\nQuestion: What week did Cleveland Browns played?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"opponent\"='cleveland browns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What is the Highest Goals for Grella?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"squad_information\" WHERE \"name\"='grella';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What is in the Notes for Player Name Grella?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"squad_information\" WHERE \"name\"='grella';" } ]
[ { "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 position did matthew tassone who was drafted after round 5 play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"round\">5 AND \"player\"='matthew tassone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"production_and_source\" (\n \"country\" text,\n \"electricity_production_kw_h_billion\" real,\n \"pct_coal\" real,\n \"pct_natural_gas\" real,\n \"pct_oil\" real,\n \"pct_hydropower\" real,\n \"pct_other_renewable\" real,\n \"pct_nuclear_power\" real\n);\n\nQuestion: what is the average % coal when the % natural gas is more than 11.6, electricity production (kw/h, billion) is less than 1,053 and % hydropower is 32?" }, { "role": "assistant", "content": "SELECT AVG(\"pct_coal\") FROM \"production_and_source\" WHERE \"pct_natural_gas\">11.6 AND \"electricity_production_kw_h_billion\"<'1,053' AND \"pct_hydropower\"=32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"production_and_source\" (\n \"country\" text,\n \"electricity_production_kw_h_billion\" real,\n \"pct_coal\" real,\n \"pct_natural_gas\" real,\n \"pct_oil\" real,\n \"pct_hydropower\" real,\n \"pct_other_renewable\" real,\n \"pct_nuclear_power\" real\n);\n\nQuestion: what is the highest % hydropower when the % oil is less than 24.5, country is united arab emirates and the % nuclear power is 0?" }, { "role": "assistant", "content": "SELECT MAX(\"pct_hydropower\") FROM \"production_and_source\" WHERE \"pct_oil\"<24.5 AND \"country\"='united arab emirates' AND \"pct_nuclear_power\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"production_and_source\" (\n \"country\" text,\n \"electricity_production_kw_h_billion\" real,\n \"pct_coal\" real,\n \"pct_natural_gas\" real,\n \"pct_oil\" real,\n \"pct_hydropower\" real,\n \"pct_other_renewable\" real,\n \"pct_nuclear_power\" real\n);\n\nQuestion: what is the highest % hydropower when % coal is 4.9 and % nuclear power is more than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"pct_hydropower\") FROM \"production_and_source\" WHERE \"pct_coal\"=4.9 AND \"pct_nuclear_power\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"production_and_source\" (\n \"country\" text,\n \"electricity_production_kw_h_billion\" real,\n \"pct_coal\" real,\n \"pct_natural_gas\" real,\n \"pct_oil\" real,\n \"pct_hydropower\" real,\n \"pct_other_renewable\" real,\n \"pct_nuclear_power\" real\n);\n\nQuestion: what is the highest electricity production (kw/h, billion) when the % other renewable is 0.4, % coal is 0 and % hydropower is more than 99?" }, { "role": "assistant", "content": "SELECT MAX(\"electricity_production_kw_h_billion\") FROM \"production_and_source\" WHERE \"pct_other_renewable\"=0.4 AND \"pct_coal\"=0 AND \"pct_hydropower\">99;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"births_and_deaths\" (\n \"periodo\" text,\n \"births\" real,\n \"deaths\" real,\n \"difference\" real,\n \"cbr\" real,\n \"cdr\" real,\n \"imr\" real,\n \"tfr\" real\n);\n\nQuestion: What is the lowest CDR that has 112 as the difference?" }, { "role": "assistant", "content": "SELECT MIN(\"cdr\") FROM \"births_and_deaths\" WHERE \"difference\"=112;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"births_and_deaths\" (\n \"periodo\" text,\n \"births\" real,\n \"deaths\" real,\n \"difference\" real,\n \"cbr\" real,\n \"cdr\" real,\n \"imr\" real,\n \"tfr\" real\n);\n\nQuestion: What TFR has births less than 131, with 125 as an IMR?" }, { "role": "assistant", "content": "SELECT \"tfr\" FROM \"births_and_deaths\" WHERE \"births\"<131 AND \"imr\"=125;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"births_and_deaths\" (\n \"periodo\" text,\n \"births\" real,\n \"deaths\" real,\n \"difference\" real,\n \"cbr\" real,\n \"cdr\" real,\n \"imr\" real,\n \"tfr\" real\n);\n\nQuestion: What average deaths have 15,0 as the IMR, with a CDR greater than 4,0?" }, { "role": "assistant", "content": "SELECT AVG(\"deaths\") FROM \"births_and_deaths\" WHERE \"imr\"='15,0' AND \"cdr\">'4,0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_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 is the player in round 6?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2009_draft_picks\" WHERE \"round\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What college did Louis LeBlanc attend?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"2009_draft_picks\" WHERE \"player\"='louis leblanc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many goals against total did the team with more than 52 goals and fewer than 10 losses have?" }, { "role": "assistant", "content": "SELECT SUM(\"goals_against\") FROM \"group_ii\" WHERE \"goals_for\">52 AND \"losses\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the low number of draws for Levante Ud when their goal difference was smaller than 6?" }, { "role": "assistant", "content": "SELECT MIN(\"draws\") FROM \"group_ii\" WHERE \"club\"='levante ud' AND \"goal_difference\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1969_as_three_leagues_come_together\" (\n \"portland_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average entry in the against column with draws smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"1969_as_three_leagues_come_together\" WHERE \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1969_as_three_leagues_come_together\" (\n \"portland_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of losses that has draws larger than 1 and a Portland DFL of westerns?" }, { "role": "assistant", "content": "SELECT SUM(\"losses\") FROM \"1969_as_three_leagues_come_together\" WHERE \"portland_dfl\"='westerns' AND \"draws\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1969_as_three_leagues_come_together\" (\n \"portland_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the sum of draws for all byes larger than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"draws\") FROM \"1969_as_three_leagues_come_together\" WHERE \"byes\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1969_as_three_leagues_come_together\" (\n \"portland_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the sum of byes for losses larger than 14 for a Portland DFL of westerns?" }, { "role": "assistant", "content": "SELECT SUM(\"byes\") FROM \"1969_as_three_leagues_come_together\" WHERE \"portland_dfl\"='westerns' AND \"losses\">14;" } ]
[ { "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 \"time\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result when the opponent was at 2 usc?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponentnum\"='at 2 usc';" } ]
[ { "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 \"time\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result on 10/08/1988?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='10/08/1988';" } ]
[ { "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 \"time\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the rank# of the opponent when the result of the game was w42-14?" }, { "role": "assistant", "content": "SELECT \"rank_num\" FROM \"schedule\" WHERE \"result\"='w42-14';" } ]
[ { "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 \"time\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game that had 56,500 in attendance?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='56,500';" } ]
[ { "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 \"time\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the rank# of the opponent when there was 93,829 in attendance?" }, { "role": "assistant", "content": "SELECT \"rank_num\" FROM \"schedule\" WHERE \"attendance\"='93,829';" } ]
[ { "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 \"time\" text,\n \"opponentnum\" text,\n \"rank_num\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the game played where the opponent was Stanford, ranked #5?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"rank_num\"='5' AND \"opponentnum\"='stanford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: Which Number of electorates (2009) has a Reserved for (SC / ST /None) of total:?" }, { "role": "assistant", "content": "SELECT \"number_of_electorates_2009\" FROM \"assembly_segments\" WHERE \"reserved_for_sc_st_none\"='total:';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What tournament took place after 1973?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"year\">1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What tournament took place before 1972 with an extra of 200 m?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"extra\"='200 m' AND \"year\"<1972;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct_competitions\" (\n \"years\" text,\n \"type\" text,\n \"original_code\" text,\n \"current_code\" text,\n \"location\" text\n);\n\nQuestion: What is the current code for the club trophy, in 1867 only?" }, { "role": "assistant", "content": "SELECT \"current_code\" FROM \"defunct_competitions\" WHERE \"type\"='club trophy' AND \"years\"='1867 only';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct_competitions\" (\n \"years\" text,\n \"type\" text,\n \"original_code\" text,\n \"current_code\" text,\n \"location\" text\n);\n\nQuestion: What is the location of the original code for victorian rules?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"defunct_competitions\" WHERE \"original_code\"='victorian rules';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct_competitions\" (\n \"years\" text,\n \"type\" text,\n \"original_code\" text,\n \"current_code\" text,\n \"location\" text\n);\n\nQuestion: What is the location for the club trophy?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"defunct_competitions\" WHERE \"type\"='club trophy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct_competitions\" (\n \"years\" text,\n \"type\" text,\n \"original_code\" text,\n \"current_code\" text,\n \"location\" text\n);\n\nQuestion: What is the location for the club trophy from the year 1867 only?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"defunct_competitions\" WHERE \"type\"='club trophy' AND \"years\"='1867 only';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Tournament is \"Tampere , Finland\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_8\" WHERE \"tournament\"='tampere , finland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Surface, when Opponent is \"Ji\u0159\u00ed Van\u011bk\"?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_8\" WHERE \"opponent\"='ji\u0159\u00ed van\u011bk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Opponent is \"Ivo Min\u00e1\u0159\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_8\" WHERE \"opponent\"='ivo min\u00e1\u0159';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Opponent is \"Daniel Gimeno-Traver\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_8\" WHERE \"opponent\"='daniel gimeno-traver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rapid_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What is Tournament, when Moves is \"37\", and when Result is \"\u00bd\u2013\u00bd\"?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"rapid_games\" WHERE \"moves\"=37 AND \"result\"='\u00bd\u2013\u00bd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rapid_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What is Result, when Year is greater than 1999, when White is \"Kramnik\", and when Tournament is \"Mainz CC Champions Duel (5)\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"rapid_games\" WHERE \"year\">1999 AND \"white\"='kramnik' AND \"tournament\"='mainz cc champions duel (5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rapid_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What is Opening, when White is Kramnik, when Year is less than 2001, and when Tournament is \"Siemens Giants\"?" }, { "role": "assistant", "content": "SELECT \"opening\" FROM \"rapid_games\" WHERE \"white\"='kramnik' AND \"year\"<2001 AND \"tournament\"='siemens giants';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rapid_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What is Tournament, when Black is \"Kramnik\", when Result is \"\u00bd\u2013\u00bd\", and when Moves is \"40\"?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"rapid_games\" WHERE \"black\"='kramnik' AND \"result\"='\u00bd\u2013\u00bd' AND \"moves\"=40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_career\" (\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 location where the opponent was Jae Young Kim?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_career\" WHERE \"opponent\"='jae young kim';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_career\" (\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 event was the opponent jose carlos oliveira?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_career\" WHERE \"opponent\"='jose carlos oliveira';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_career\" (\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: How many rounds was the bout against bobby rehman?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_career\" WHERE \"opponent\"='bobby rehman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_career\" (\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: Where was the location when the record was 12-5?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_career\" WHERE \"record\"='12-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"dvd_title\" text,\n \"no_of_discs\" real,\n \"year\" text,\n \"no_of_episodes\" real,\n \"region_1\" text,\n \"region_2\" text,\n \"region_4\" text\n);\n\nQuestion: Which DVD Title has a Region 1 of n/a and greater than 3 in No. of Discs?" }, { "role": "assistant", "content": "SELECT \"dvd_title\" FROM \"dvd_releases\" WHERE \"region_1\"='n/a' AND \"no_of_discs\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"dvd_title\" text,\n \"no_of_discs\" real,\n \"year\" text,\n \"no_of_episodes\" real,\n \"region_1\" text,\n \"region_2\" text,\n \"region_4\" text\n);\n\nQuestion: Which region 1 has 12 Episodes and a Region 2 of 18 August 2008?" }, { "role": "assistant", "content": "SELECT \"region_1\" FROM \"dvd_releases\" WHERE \"no_of_episodes\"=12 AND \"region_2\"='18 august 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: WHAT TRIES HAVE TRIES AGAINST AT 140?" }, { "role": "assistant", "content": "SELECT \"tries_for\" FROM \"league_table\" WHERE \"tries_against\"='140';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: WHAT IS THE TRIES AGAINST WITH PLAYED 22, POINTS AGAINST 784?" }, { "role": "assistant", "content": "SELECT \"tries_against\" FROM \"league_table\" WHERE \"played\"='22' AND \"points_against\"='784';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: WHAT IS THE TRIES WITH POINTS 190?" }, { "role": "assistant", "content": "SELECT \"tries_for\" FROM \"league_table\" WHERE \"points_for\"='190';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: WHAT IS THE POINTS WITH 55 TRIES?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"league_table\" WHERE \"tries_for\"='55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: WHAT IS THE LOST WITH 1 LOSING BONUS, 148 POINTS?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"league_table\" WHERE \"losing_bonus\"='1' AND \"points_for\"='148';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: WHAT IS THE LOSING BONUS WITH 190 POINTS?" }, { "role": "assistant", "content": "SELECT \"losing_bonus\" FROM \"league_table\" WHERE \"points_for\"='190';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: What is the sum of the pick of the guard position player?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"1954_ohio_state_buckeyes_football_team\" WHERE \"position\"='guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: What is the NFL club with pick # 153?" }, { "role": "assistant", "content": "SELECT \"nfl_club\" FROM \"1954_ohio_state_buckeyes_football_team\" WHERE \"pick\"=153;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: Who is the player from a round less than 13 and has a pick of 74?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"1954_ohio_state_buckeyes_football_team\" WHERE \"round\"<13 AND \"pick\"=74;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: Who is the player from round 13 that plays center?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"1954_ohio_state_buckeyes_football_team\" WHERE \"round\"=13 AND \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: What is the NFL club with a pick less than 74 and a round greater than 2?" }, { "role": "assistant", "content": "SELECT \"nfl_club\" FROM \"1954_ohio_state_buckeyes_football_team\" WHERE \"pick\"<74 AND \"round\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"season\" text,\n \"record\" text,\n \"seed\" text,\n \"first_round\" text,\n \"conference_semifinals\" text,\n \"conference_finals\" text,\n \"nba_finals\" text\n);\n\nQuestion: Which Conference Semifinals has a Record of 55\u201327?" }, { "role": "assistant", "content": "SELECT \"conference_semifinals\" FROM \"playoffs\" WHERE \"record\"='55\u201327';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"season\" text,\n \"record\" text,\n \"seed\" text,\n \"first_round\" text,\n \"conference_semifinals\" text,\n \"conference_finals\" text,\n \"nba_finals\" text\n);\n\nQuestion: Which Conference Semifinals has a Conference Finals of \u2020 denotes division championship?" }, { "role": "assistant", "content": "SELECT \"conference_semifinals\" FROM \"playoffs\" WHERE \"conference_finals\"='\u2020 denotes division championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"season\" text,\n \"record\" text,\n \"seed\" text,\n \"first_round\" text,\n \"conference_semifinals\" text,\n \"conference_finals\" text,\n \"nba_finals\" text\n);\n\nQuestion: Which Conference Finals has a Seed of \u2020 denotes division championship?" }, { "role": "assistant", "content": "SELECT \"conference_finals\" FROM \"playoffs\" WHERE \"seed\"='\u2020 denotes division championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: What rank is the publication the observer music monthly?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"accolades\" WHERE \"publication\"='the observer music monthly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" text\n);\n\nQuestion: What is the publication the observer music monthly highest year?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"accolades\" WHERE \"publication\"='the observer music monthly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s_49ers_17_3\" (\n \"year\" real,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"visiting_team\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average Attendance, when Venue is \"Candlestick Park\", and when Date is \"December 27\"?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"1990s_49ers_17_3\" WHERE \"venue\"='candlestick park' AND \"date\"='december 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s_49ers_17_3\" (\n \"year\" real,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"visiting_team\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What is Result, when Date is \"November 22\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"1990s_49ers_17_3\" WHERE \"date\"='november 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1990s_49ers_17_3\" (\n \"year\" real,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"visiting_team\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average Attendance, when Venue is \"Candlestick Park\", and when Date is \"November 25\"?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"1990s_49ers_17_3\" WHERE \"venue\"='candlestick park' AND \"date\"='november 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: What bronze has tatiana ryabkina as the silver, anne margrethe hausken as the gold?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"women\" WHERE \"silver\"='tatiana ryabkina' AND \"gold\"='anne margrethe hausken';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What label is in CD format in Australia?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='cd' AND \"region\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the label for catalog number CRG3P-90054?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='crg3p-90054';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the format for the MCA label?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='mca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the catalog number for the Grilled Cheese label?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"label\"='grilled cheese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which region has the format CD and label MCA?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"format\"='cd' AND \"label\"='mca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the format for the label Mightier than Sword on January 12, 2010 in the United States?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"region\"='united states' AND \"date\"='january 12, 2010' AND \"label\"='mightier than sword';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"distance_from_wellington\" text,\n \"height_above_sea_level_m\" text,\n \"opened\" real,\n \"closed\" text\n);\n\nQuestion: Which station that sat 54m above seal level is now Closed?" }, { "role": "assistant", "content": "SELECT \"station\" FROM \"stations\" WHERE \"height_above_sea_level_m\"='54m' AND \"closed\"='closed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"distance_from_wellington\" text,\n \"height_above_sea_level_m\" text,\n \"opened\" real,\n \"closed\" text\n);\n\nQuestion: Opened prior to 1877 only 2.44km from Wellington, when did this station close?" }, { "role": "assistant", "content": "SELECT \"closed\" FROM \"stations\" WHERE \"opened\"<1877 AND \"distance_from_wellington\"='2.44km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"distance_from_wellington\" text,\n \"height_above_sea_level_m\" text,\n \"opened\" real,\n \"closed\" text\n);\n\nQuestion: What is the height above sea level for the station opened 175.67km from Wellington prior to 1887?" }, { "role": "assistant", "content": "SELECT \"height_above_sea_level_m\" FROM \"stations\" WHERE \"opened\"<1887 AND \"distance_from_wellington\"='175.67km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"distance_from_wellington\" text,\n \"height_above_sea_level_m\" text,\n \"opened\" real,\n \"closed\" text\n);\n\nQuestion: For the station opened after 1876 at 604.53km from Wellington, what is the height above sea level?" }, { "role": "assistant", "content": "SELECT \"height_above_sea_level_m\" FROM \"stations\" WHERE \"opened\">1876 AND \"distance_from_wellington\"='604.53km';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent at the game attended by 70,012?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='70,012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the date of the post-week 2 game with a result of l 16\u201310?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">2 AND \"result\"='l 16\u201310';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: What is the highest to par number for Justin Leonard when the total is less than 297?" }, { "role": "assistant", "content": "SELECT MAX(\"to_par\") FROM \"made_the_cut\" WHERE \"player\"='justin leonard' AND \"total\"<297;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: What is the total when the finish was t44?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"made_the_cut\" WHERE \"finish\"='t44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: What country has a total larger than 293, and a to par less than 17?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"total\">293 AND \"to_par\"<17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: When Karaorman is Team 1, what is the Agg.?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"eighth_finals\" WHERE \"team_1\"='karaorman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text\n);\n\nQuestion: What is week 3 when week 6 is 26.05?" }, { "role": "assistant", "content": "SELECT \"week_3\" FROM \"scores\" WHERE \"week_6\"='26.05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text\n);\n\nQuestion: What is week 5 when week 2 is 36.80, and week 4 is 39.75?" }, { "role": "assistant", "content": "SELECT \"week_5\" FROM \"scores\" WHERE \"week_2\"='36.80' AND \"week_4\"='39.75';" } ]