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 \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the team classification for stage of 6" }, { "role": "assistant", "content": "SELECT \"team_classification\" FROM \"jersey_progress\" WHERE \"stage\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sonshine_radio_stations_in_the_philippin\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the Davao's power (kW)?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"sonshine_radio_stations_in_the_philippin\" WHERE \"location\"='davao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sonshine_radio_stations_in_the_philippin\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the brand of DXRE?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"sonshine_radio_stations_in_the_philippin\" WHERE \"callsign\"='dxre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sonshine_radio_stations_in_the_philippin\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the power (kW) of Davao?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"sonshine_radio_stations_in_the_philippin\" WHERE \"location\"='davao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sonshine_radio_stations_in_the_philippin\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the callsign of Cagayan de Oro with 5kW?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"sonshine_radio_stations_in_the_philippin\" WHERE \"power_k_w\"='5kw' AND \"location\"='cagayan de oro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sonshine_radio_stations_in_the_philippin\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the callsign of the 5kW Sonshine Radio Cotabato?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"sonshine_radio_stations_in_the_philippin\" WHERE \"power_k_w\"='5kw' AND \"branding\"='sonshine radio cotabato';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_batting_averages\" (\n \"matches\" real,\n \"innings\" real,\n \"not_outs\" real,\n \"runs\" real,\n \"average\" real\n);\n\nQuestion: What's the average amount of Runs that has 40 innings, and Not outs larger than 6?" }, { "role": "assistant", "content": "SELECT AVG(\"runs\") FROM \"highest_batting_averages\" WHERE \"innings\"=40 AND \"not_outs\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_batting_averages\" (\n \"matches\" real,\n \"innings\" real,\n \"not_outs\" real,\n \"runs\" real,\n \"average\" real\n);\n\nQuestion: What's the total Innings that has Runs of 1598, and Matches less than 41?" }, { "role": "assistant", "content": "SELECT COUNT(\"innings\") FROM \"highest_batting_averages\" WHERE \"runs\"=1598 AND \"matches\"<41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"party\" text,\n \"party_list_votes\" real,\n \"vote_percentage\" text,\n \"total_seats\" real,\n \"seat_percentage\" text\n);\n\nQuestion: What is the highest total number of seats with a Seat percentage of 46.5% and less than 394,118 party list votes?" }, { "role": "assistant", "content": "SELECT MAX(\"total_seats\") FROM \"results\" WHERE \"seat_percentage\"='46.5%' AND \"party_list_votes\"<'394,118';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"party\" text,\n \"party_list_votes\" real,\n \"vote_percentage\" text,\n \"total_seats\" real,\n \"seat_percentage\" text\n);\n\nQuestion: What is the number of party list votes for a vote percentage of 2.6% with 0 total seats?" }, { "role": "assistant", "content": "SELECT SUM(\"party_list_votes\") FROM \"results\" WHERE \"total_seats\"=0 AND \"vote_percentage\"='2.6%';" } ]
[ { "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 \"competition\" text,\n \"venue\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What venue held the event in 2008 that has 2:13:10 in the notes?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"=2008 AND \"notes\"='2:13:10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_data\" (\n \"name\" text,\n \"discovered\" real,\n \"museum\" text,\n \"museum_city\" text,\n \"discoverer\" text,\n \"formation\" text,\n \"location\" text\n);\n\nQuestion: Who discovered the specimen at the Burpee Museum of Natural History?" }, { "role": "assistant", "content": "SELECT \"discoverer\" FROM \"specimen_data\" WHERE \"museum\"='burpee museum of natural history';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_data\" (\n \"name\" text,\n \"discovered\" real,\n \"museum\" text,\n \"museum_city\" text,\n \"discoverer\" text,\n \"formation\" text,\n \"location\" text\n);\n\nQuestion: What is the name of the specimen that was discovered after 1987 and is in an Indianapolis, Indiana museum?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"specimen_data\" WHERE \"discovered\">1987 AND \"museum_city\"='indianapolis, in';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_data\" (\n \"name\" text,\n \"discovered\" real,\n \"museum\" text,\n \"museum_city\" text,\n \"discoverer\" text,\n \"formation\" text,\n \"location\" text\n);\n\nQuestion: What is the formation that had the specimen discovered before 2001 and is in an Indianapolis, Indiana museum?" }, { "role": "assistant", "content": "SELECT \"formation\" FROM \"specimen_data\" WHERE \"discovered\"<2001 AND \"museum_city\"='indianapolis, in';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_data\" (\n \"name\" text,\n \"discovered\" real,\n \"museum\" text,\n \"museum_city\" text,\n \"discoverer\" text,\n \"formation\" text,\n \"location\" text\n);\n\nQuestion: What is the city of the Museum that houses the specimen discovered by Jane Solem?" }, { "role": "assistant", "content": "SELECT \"museum_city\" FROM \"specimen_data\" WHERE \"discoverer\"='jane solem';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_data\" (\n \"name\" text,\n \"discovered\" real,\n \"museum\" text,\n \"museum_city\" text,\n \"discoverer\" text,\n \"formation\" text,\n \"location\" text\n);\n\nQuestion: What city has the museum that holds the Sue specimen?" }, { "role": "assistant", "content": "SELECT \"museum_city\" FROM \"specimen_data\" WHERE \"name\"='sue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grey_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: With what Name does the Roll of 637 belong?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"grey_district\" WHERE \"roll\"='637';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grey_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: Which is the Authority that has a Roll of 70?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"grey_district\" WHERE \"roll\"='70';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grey_district\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: The Decile of 6 has which corresponding Years?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"grey_district\" WHERE \"decile\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"film\" text,\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Name the award for candida scott knight" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"2004\" WHERE \"director_s\"='candida scott knight';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"film\" text,\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Name the recipient for jamaica and award of \u00a36,947" }, { "role": "assistant", "content": "SELECT \"recipient\" FROM \"2004\" WHERE \"award\"='\u00a36,947' AND \"film\"='jamaica';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"film\" text,\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Name the film for award of \u00a33,740" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"2004\" WHERE \"award\"='\u00a33,740';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"film\" text,\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Name the director for maya vision international ltd" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"2004\" WHERE \"recipient\"='maya vision international ltd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"film\" text,\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Name the film for award of \u00a33,386" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"2004\" WHERE \"award\"='\u00a33,386';" } ]
[ { "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 \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Name the venue for 2004 and position of 25th" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"position\"='25th' AND \"year\"=2004;" } ]
[ { "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 \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Name the venue for 27th position" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"position\"='27th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score of the draw in the 2005 FIFA Confederations Cup?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2005 fifa confederations cup' AND \"result\"='draw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"votes_by_state\" (\n \"state\" text,\n \"electors\" real,\n \"bush\" real,\n \"kerry\" real,\n \"nader\" real,\n \"badnarik\" real,\n \"peroutka\" real,\n \"cobb\" real,\n \"others\" real,\n \"margin\" text,\n \"total\" real\n);\n\nQuestion: How many electors has 465,151 naders and more than 143,630 Peroutka?" }, { "role": "assistant", "content": "SELECT SUM(\"electors\") FROM \"votes_by_state\" WHERE \"nader\"='465,151' AND \"peroutka\">'143,630';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"votes_by_state\" (\n \"state\" text,\n \"electors\" real,\n \"bush\" real,\n \"kerry\" real,\n \"nader\" real,\n \"badnarik\" real,\n \"peroutka\" real,\n \"cobb\" real,\n \"others\" real,\n \"margin\" text,\n \"total\" real\n);\n\nQuestion: What is the highest Peroutka with 46 others, and less than 15 electors?" }, { "role": "assistant", "content": "SELECT MAX(\"peroutka\") FROM \"votes_by_state\" WHERE \"others\"=46 AND \"electors\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_day_final_1988_2009\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: Who came in 3rd place in 1990?" }, { "role": "assistant", "content": "SELECT \"3rd_place\" FROM \"one_day_final_1988_2009\" WHERE \"year\"='1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which class Pos has a Team of jml team panoz?" }, { "role": "assistant", "content": "SELECT \"class_pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='jml team panoz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps?" }, { "role": "assistant", "content": "SELECT \"class_pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\">1997 AND \"team\"='corvette racing' AND \"class\"='gt1' AND \"laps\"=327;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"final\" text\n);\n\nQuestion: What is the final result of the team that has Simara as No.5?" }, { "role": "assistant", "content": "SELECT \"final\" FROM \"nominations\" WHERE \"no_5\"='simara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_indy_500_summary\" (\n \"season\" real,\n \"cars_entered\" real,\n \"winning_driver\" text,\n \"second_driver\" text,\n \"third_driver\" text,\n \"race_report\" text\n);\n\nQuestion: Which Winning Driver has a Second Driver of jimmy bryan?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"world_championship_indy_500_summary\" WHERE \"second_driver\"='jimmy bryan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_indy_500_summary\" (\n \"season\" real,\n \"cars_entered\" real,\n \"winning_driver\" text,\n \"second_driver\" text,\n \"third_driver\" text,\n \"race_report\" text\n);\n\nQuestion: How many average Cars Entered have a Third Driver of manny ayulo?" }, { "role": "assistant", "content": "SELECT AVG(\"cars_entered\") FROM \"world_championship_indy_500_summary\" WHERE \"third_driver\"='manny ayulo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_indy_500_summary\" (\n \"season\" real,\n \"cars_entered\" real,\n \"winning_driver\" text,\n \"second_driver\" text,\n \"third_driver\" text,\n \"race_report\" text\n);\n\nQuestion: What are the largest Cars Entered with a Season of 1958?" }, { "role": "assistant", "content": "SELECT MAX(\"cars_entered\") FROM \"world_championship_indy_500_summary\" WHERE \"season\"=1958;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_indy_500_summary\" (\n \"season\" real,\n \"cars_entered\" real,\n \"winning_driver\" text,\n \"second_driver\" text,\n \"third_driver\" text,\n \"race_report\" text\n);\n\nQuestion: What is the largest season with a Third Driver of jimmy davies?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"world_championship_indy_500_summary\" WHERE \"third_driver\"='jimmy davies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_indy_500_summary\" (\n \"season\" real,\n \"cars_entered\" real,\n \"winning_driver\" text,\n \"second_driver\" text,\n \"third_driver\" text,\n \"race_report\" text\n);\n\nQuestion: What are the largest Cars Entered with a Winning Driver of rodger ward, and a Season smaller than 1959?" }, { "role": "assistant", "content": "SELECT MAX(\"cars_entered\") FROM \"world_championship_indy_500_summary\" WHERE \"winning_driver\"='rodger ward' AND \"season\"<1959;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What engine with more than 2 points has Brabham bt58 as Chassis?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"chassis\"='brabham bt58' AND \"points\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points did Judd v8 has in 1989?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_results\" WHERE \"engine\"='judd v8' AND \"year\"=1989;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many years has Sasol Jordan Yamaha as an Entrant?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='sasol jordan yamaha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record for the game that had a loss of Williams (3-1)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='williams (3-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\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game that had a loss of Embree (1-2)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='embree (1-2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What shows for 2007 at the Olympic Games as tournament." }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='olympic games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What shows for 2009 when the 2012 is 1R?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2012\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2010 when the 2009 shows Q1?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2009\"='q1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"state\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What is the gross revenue in 2011 for MO?" }, { "role": "assistant", "content": "SELECT \"gross_revenue_2011\" FROM \"box_office_score_data\" WHERE \"state\"='mo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"state\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: Which state has the venue Tsukisamu dome?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"box_office_score_data\" WHERE \"venue\"='tsukisamu dome';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"state\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: Which city had a gross revenue in 2011 of $739,578?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"box_office_score_data\" WHERE \"gross_revenue_2011\"='$739,578';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"venue\" text,\n \"city\" text,\n \"state\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What is the gross revenue in 2011 with a gross revenue in 1982 of $1,988,047?" }, { "role": "assistant", "content": "SELECT \"gross_revenue_2011\" FROM \"box_office_score_data\" WHERE \"gross_revenue_1982\"='$1,988,047';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What was the grid when the driver was Mark Webber?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"race\" WHERE \"driver\"='mark webber';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who was the driver, when the constructor was Renault, and when the Time/Retired was +38.600?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"constructor\"='renault' AND \"time_retired\"='+38.600';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: How many laps were there when the Time/Retired was +1:00.003?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"time_retired\"='+1:00.003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: How many laps were there when the Time/Retired was +14.403?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"time_retired\"='+14.403';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who was the driver when there were 35 laps?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"='35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: How many laps were there when the constructor was Renault, and when the Driver was Fernando Alonso?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"constructor\"='renault' AND \"driver\"='fernando alonso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_feet_m\" text,\n \"floors\" real\n);\n\nQuestion: What's the Street address with a Name of New York Life Insurance building?" }, { "role": "assistant", "content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='new york life insurance building';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_feet_m\" text,\n \"floors\" real\n);\n\nQuestion: What's the Years as tallest with a Street address of 324 E. 11th Street?" }, { "role": "assistant", "content": "SELECT \"years_as_tallest\" FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='324 e. 11th street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_feet_m\" text,\n \"floors\" real\n);\n\nQuestion: What is listsed as the Height feet/m and has a Street address of 2345 Grand Avenue?" }, { "role": "assistant", "content": "SELECT \"height_feet_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='2345 grand avenue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ontario_university_athletics_yates_cup\" (\n \"institution\" text,\n \"team\" text,\n \"city\" text,\n \"province\" text,\n \"first_season\" real,\n \"head_coach\" text,\n \"enrollment\" real,\n \"football_stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What is the average capacity of stadiums in the City of London that belong to schools with an enrollment less than 30,000?" }, { "role": "assistant", "content": "SELECT AVG(\"capacity\") FROM \"ontario_university_athletics_yates_cup\" WHERE \"city\"='london' AND \"enrollment\"<'30,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who had a score of 69-70=139?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='69-70=139';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score of the game that had a result of 5\u20130?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='5\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the heat number of the athlete who finished in 2:23.95?" }, { "role": "assistant", "content": "SELECT AVG(\"heat\") FROM \"heats\" WHERE \"time\"='2:23.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which lane did the athlete from Zambia swim in?" }, { "role": "assistant", "content": "SELECT \"lane\" FROM \"heats\" WHERE \"nationality\"='zambia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game when the record was 4-5?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='4-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"breakdown_by_nationality\" (\n \"country\" text,\n \"2012\" real,\n \"2011\" real,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2007\" real,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" real,\n \"2001\" real,\n \"2000\" real,\n \"1999\" real,\n \"1998\" real,\n \"1997\" real,\n \"1996\" real,\n \"1995\" real,\n \"1994\" real,\n \"1993\" real,\n \"1992\" real,\n \"1991\" real,\n \"1990\" real,\n \"1989\" real,\n \"1988\" real\n);\n\nQuestion: What is the average for 2009 when 2001 is more than 0, 1996 is less than 1 and 2004 is more than 2" }, { "role": "assistant", "content": "SELECT AVG(\"2009\") FROM \"breakdown_by_nationality\" WHERE \"2001\">0 AND \"1996\"<1 AND \"2004\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"breakdown_by_nationality\" (\n \"country\" text,\n \"2012\" real,\n \"2011\" real,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2007\" real,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" real,\n \"2001\" real,\n \"2000\" real,\n \"1999\" real,\n \"1998\" real,\n \"1997\" real,\n \"1996\" real,\n \"1995\" real,\n \"1994\" real,\n \"1993\" real,\n \"1992\" real,\n \"1991\" real,\n \"1990\" real,\n \"1989\" real,\n \"1988\" real\n);\n\nQuestion: What is the listing for 2009 when 1989 is less than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"2009\") FROM \"breakdown_by_nationality\" WHERE \"1989\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"breakdown_by_nationality\" (\n \"country\" text,\n \"2012\" real,\n \"2011\" real,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2007\" real,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" real,\n \"2001\" real,\n \"2000\" real,\n \"1999\" real,\n \"1998\" real,\n \"1997\" real,\n \"1996\" real,\n \"1995\" real,\n \"1994\" real,\n \"1993\" real,\n \"1992\" real,\n \"1991\" real,\n \"1990\" real,\n \"1989\" real,\n \"1988\" real\n);\n\nQuestion: what is the average for 2005 when 1995 is more than 3, 1996 is less than 4, and 2011 is more than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"2005\") FROM \"breakdown_by_nationality\" WHERE \"1995\">3 AND \"1996\"<4 AND \"2011\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"breakdown_by_nationality\" (\n \"country\" text,\n \"2012\" real,\n \"2011\" real,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2007\" real,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" real,\n \"2001\" real,\n \"2000\" real,\n \"1999\" real,\n \"1998\" real,\n \"1997\" real,\n \"1996\" real,\n \"1995\" real,\n \"1994\" real,\n \"1993\" real,\n \"1992\" real,\n \"1991\" real,\n \"1990\" real,\n \"1989\" real,\n \"1988\" real\n);\n\nQuestion: what is the listing for 1999 when 1990 is more than 0, 2003 is 3, 2007 is more than 1 and 1996 is more than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"1999\") FROM \"breakdown_by_nationality\" WHERE \"1990\">0 AND \"2003\"=3 AND \"2007\">1 AND \"1996\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"breakdown_by_nationality\" (\n \"country\" text,\n \"2012\" real,\n \"2011\" real,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2007\" real,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" real,\n \"2001\" real,\n \"2000\" real,\n \"1999\" real,\n \"1998\" real,\n \"1997\" real,\n \"1996\" real,\n \"1995\" real,\n \"1994\" real,\n \"1993\" real,\n \"1992\" real,\n \"1991\" real,\n \"1990\" real,\n \"1989\" real,\n \"1988\" real\n);\n\nQuestion: what is the listing for 2012 when 2004 is more than 0, 2008 is more than 1 1994 is 8 and 2005 is less than 11?" }, { "role": "assistant", "content": "SELECT MIN(\"2012\") FROM \"breakdown_by_nationality\" WHERE \"2004\">0 AND \"2008\">1 AND \"1994\"=8 AND \"2005\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"breakdown_by_nationality\" (\n \"country\" text,\n \"2012\" real,\n \"2011\" real,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2007\" real,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" real,\n \"2001\" real,\n \"2000\" real,\n \"1999\" real,\n \"1998\" real,\n \"1997\" real,\n \"1996\" real,\n \"1995\" real,\n \"1994\" real,\n \"1993\" real,\n \"1992\" real,\n \"1991\" real,\n \"1990\" real,\n \"1989\" real,\n \"1988\" real\n);\n\nQuestion: what is the listing for 1992 when 1999 is more than 1, 2008 is less than 2 and 2003 is less than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"1992\") FROM \"breakdown_by_nationality\" WHERE \"1999\">1 AND \"2008\"<2 AND \"2003\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"periodization\" (\n \"week\" real,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"volume_lbs\" real,\n \"peak_intensity_last_set\" text,\n \"pct_of_1_rep_max_last_set\" text\n);\n\nQuestion: How many % of 1 Rep Max(Last Set) has a Set 4 of 145lb x 5reps?" }, { "role": "assistant", "content": "SELECT \"pct_of_1_rep_max_last_set\" FROM \"periodization\" WHERE \"set_4\"='145lb x 5reps';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"periodization\" (\n \"week\" real,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"volume_lbs\" real,\n \"peak_intensity_last_set\" text,\n \"pct_of_1_rep_max_last_set\" text\n);\n\nQuestion: How many lbs does a set 4 of 115lb x 8reps have?" }, { "role": "assistant", "content": "SELECT \"volume_lbs\" FROM \"periodization\" WHERE \"set_4\"='115lb x 8reps';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"periodization\" (\n \"week\" real,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"volume_lbs\" real,\n \"peak_intensity_last_set\" text,\n \"pct_of_1_rep_max_last_set\" text\n);\n\nQuestion: What is set 3 on week 6?" }, { "role": "assistant", "content": "SELECT \"set_3\" FROM \"periodization\" WHERE \"week\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the per-capita GDP for the country with an overall GDP of 156.640?" }, { "role": "assistant", "content": "SELECT \"gdp_per_capita_us\" FROM \"1995_enlargement\" WHERE \"gdp_billion_us\"='156.640';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the per-capita GDP of the country with an overall GDP of 80.955?" }, { "role": "assistant", "content": "SELECT \"gdp_per_capita_us\" FROM \"1995_enlargement\" WHERE \"gdp_billion_us\"='80.955';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1995_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: Which country has an area of 871,980 square km?" }, { "role": "assistant", "content": "SELECT \"member_countries\" FROM \"1995_enlargement\" WHERE \"area_km\"='871,980';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_8_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: On October 1, 1995 with Dora Djilianova as a partner, what was the outcome of the match?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_11_8_3\" WHERE \"partner\"='dora djilianova' AND \"date\"='october 1, 1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_8_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: With Lindsay Lee-Waters as a partner, what was the final score?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"doubles_11_8_3\" WHERE \"partner\"='lindsay lee-waters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which score has a Date of august 17?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='august 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which score has an Opponent of @ athletics, and a Record of 76-57?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='@ athletics' AND \"record\"='76-57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which loss has a Record of 67-51?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='67-51';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"races\" text,\n \"wins\" text,\n \"position\" text\n);\n\nQuestion: Which position has 2 wins in 1992?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"career_summary\" WHERE \"wins\"='2' AND \"season\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"races\" text,\n \"wins\" text,\n \"position\" text\n);\n\nQuestion: How many wins have a Series of formula nippon, and a Position of 8th?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"career_summary\" WHERE \"series\"='formula nippon' AND \"position\"='8th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"races\" text,\n \"wins\" text,\n \"position\" text\n);\n\nQuestion: What is the smallest season with 6 races, 2 wins, and a Series of all-japan gt championship>" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"career_summary\" WHERE \"races\"='6' AND \"series\"='all-japan gt championship' AND \"wins\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What was Mark Brooks total score when he finished more than 2 above par?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"missed_the_cut\" WHERE \"to_par\">2 AND \"player\"='mark brooks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What was the winning to par score of the 1993 PGA Championship?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"missed_the_cut\" WHERE \"year_s_won\"='1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"builder\" text,\n \"construct_tion_no\" real,\n \"date_ordered\" text,\n \"wheel_arrange_ment\" text,\n \"s_cylinder\" text,\n \"engine_weight\" text,\n \"tc_st_l_no_1883_84\" real\n);\n\nQuestion: How many constructions has a Wheel arrange- ment of 4-4-0?" }, { "role": "assistant", "content": "SELECT SUM(\"construct_tion_no\") FROM \"equipment\" WHERE \"wheel_arrange_ment\"='4-4-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"builder\" text,\n \"construct_tion_no\" real,\n \"date_ordered\" text,\n \"wheel_arrange_ment\" text,\n \"s_cylinder\" text,\n \"engine_weight\" text,\n \"tc_st_l_no_1883_84\" real\n);\n\nQuestion: Who built the order on November 1881 of more than 54 TC&StL no. (1883\u201384)?" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"equipment\" WHERE \"tc_st_l_no_1883_84\">54 AND \"date_ordered\"='november 1881';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the Season Outcome for the Sussex Central School?" }, { "role": "assistant", "content": "SELECT \"season_outcome\" FROM \"2010_regular_season_football_standings\" WHERE \"school\"='sussex central';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the School of Sussex Tech's Team?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"2010_regular_season_football_standings\" WHERE \"school\"='sussex tech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the Team for the Milford School?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"2010_regular_season_football_standings\" WHERE \"school\"='milford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"rating\" text,\n \"win_num\" text\n);\n\nQuestion: Which season was one of the players rated +33?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"winners\" WHERE \"rating\"='+33';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"rating\" text,\n \"win_num\" text\n);\n\nQuestion: What is the name of the team that had 1 win and a rating of +85?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"winners\" WHERE \"win_num\"='1' AND \"rating\"='+85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"rating\" text,\n \"win_num\" text\n);\n\nQuestion: Which season was one of the players rated +98?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"winners\" WHERE \"rating\"='+98';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"rating\" text,\n \"win_num\" text\n);\n\nQuestion: What is Patrice Bergeron's rating?" }, { "role": "assistant", "content": "SELECT \"rating\" FROM \"winners\" WHERE \"player\"='patrice bergeron';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Position of defensive tackle, and a Round of 4, and a Pick # smaller than 36 has what overall average?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"indianapolis_colts_draft_history\" WHERE \"position\"='defensive tackle' AND \"round\"=4 AND \"pick_num\"<36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Pick # that has a Name of jaimie thomas, and a Round smaller than 7 is how many numbers?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='jaimie thomas' AND \"round\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mt_and_cr_series_models\" (\n \"colt_model_no\" text,\n \"name\" text,\n \"stock\" text,\n \"fire_control\" text,\n \"rear_sight\" text,\n \"forward_assist\" text,\n \"case_deflector\" text,\n \"barrel_length\" text,\n \"barrel_profile\" text,\n \"barrel_twist\" text,\n \"hand_guards\" text,\n \"bayonet_lug\" text,\n \"muzzle_device\" text\n);\n\nQuestion: What is the muzzle device with a 1:7 barrel twist and a stock 4th generation?" }, { "role": "assistant", "content": "SELECT \"muzzle_device\" FROM \"mt_and_cr_series_models\" WHERE \"barrel_twist\"='1:7' AND \"stock\"='4th generation';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_team_matches\" (\n \"date\" text,\n \"location\" text,\n \"opponenent\" text,\n \"result\" text,\n \"match_type\" text\n);\n\nQuestion: When was the opponent Poland and the match type EC -qualifier?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"national_team_matches\" WHERE \"opponenent\"='poland' AND \"match_type\"='ec -qualifier';" } ]