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 \"indy_500_results\" (\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the sum of all laps with rank 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"indy_500_results\" WHERE \"rank\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the sum of all laps starting at 10 and finishing at 20?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"indy_500_results\" WHERE \"start\"='10' AND \"finish\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What's the rank when the start is 10 and the laps are fewer than 192?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"start\"='10' AND \"laps\"<192;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What's the rank when the laps are fewer than 137 and the qual is 116.470?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"laps\"<137 AND \"qual\"='116.470';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_i\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What director worked with Al Mackay as writer?" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"2009_i\" WHERE \"writer_s\"='al mackay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_i\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Which producer worked with Robert Sproul-cran as writer?" }, { "role": "assistant", "content": "SELECT \"producer_s\" FROM \"2009_i\" WHERE \"writer_s\"='robert sproul-cran';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_i\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Which film did Al Mackay write?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"2009_i\" WHERE \"writer_s\"='al mackay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_i\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Who directed the film 'The Chapel'?" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"2009_i\" WHERE \"film\"='the chapel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_i\" (\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What award did Andrew Ryder win as producer?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"2009_i\" WHERE \"producer_s\"='andrew ryder';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the total national rank of Canada with lanes larger than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"semifinal_1\" WHERE \"nationality\"='canada' AND \"lane\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: For the team with 39+1 points and fewer than 7 draws, how many wins were scored?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"final_table\" WHERE \"points\"='39+1' AND \"draws\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: For a goal difference greater than 3 and fewer than 8 losses, what is the most draws scored?" }, { "role": "assistant", "content": "SELECT MAX(\"draws\") FROM \"final_table\" WHERE \"goal_difference\">3 AND \"losses\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which club had fewer than 29 goals against and a difference smaller than 26?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"final_table\" WHERE \"goals_against\"<29 AND \"goal_difference\"<26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score when the Rangers' attendance was 23,493?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\"='23,493';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent on the game on April 14, 2007?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"2007_game_log\" WHERE \"date\"='april 14, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: How many people were in attendance on the game on April 8, 2007?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"2007_game_log\" WHERE \"date\"='april 8, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the date of the game with 16,404 people?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2007_game_log\" WHERE \"attendance\"='16,404';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nickelodeon_movies\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"winner_nominee_s\" text,\n \"result\" text\n);\n\nQuestion: Which category was Dev Patel nominated for?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"nickelodeon_movies\" WHERE \"winner_nominee_s\"='dev patel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nickelodeon_movies\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"winner_nominee_s\" text,\n \"result\" text\n);\n\nQuestion: Which film was Eddie Murphy nominated for?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"nickelodeon_movies\" WHERE \"winner_nominee_s\"='eddie murphy' AND \"result\"='nominated';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: When the start is 22, what is the finish?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"start\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What year resulted in 54 laps?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"=54;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"los_angeles_kings_4_edmonton_oilers_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: On what date was the score 2\u20134?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"los_angeles_kings_4_edmonton_oilers_3\" WHERE \"score\"='2\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"los_angeles_kings_4_edmonton_oilers_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team when the score was 4\u20133?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"los_angeles_kings_4_edmonton_oilers_3\" WHERE \"score\"='4\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"los_angeles_kings_4_edmonton_oilers_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: On what date was the record 2\u20131?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"los_angeles_kings_4_edmonton_oilers_3\" WHERE \"record\"='2\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"winning_manufacturer\" text\n);\n\nQuestion: Who was the winning driver with the winning team Opel Team Holzer 1, and a round under 9 with the fastest lap being Bernd Schneider?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"race_calendar_and_winners\" WHERE \"winning_team\"='opel team holzer 1' AND \"round\"<9 AND \"fastest_lap\"='bernd schneider';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"winning_manufacturer\" text\n);\n\nQuestion: What was the final number for the winning manufacturer with Mercedes-benz, and a circuit of hockenheimring?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"race_calendar_and_winners\" WHERE \"winning_manufacturer\"='mercedes-benz' AND \"circuit\"='hockenheimring';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"winning_manufacturer\" text\n);\n\nQuestion: What was the date of Circuit Hockenheimring and the winning manufacturer being Mercedes-Benz?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"race_calendar_and_winners\" WHERE \"circuit\"='hockenheimring' AND \"winning_manufacturer\"='mercedes-benz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"winning_manufacturer\" text\n);\n\nQuestion: Who was the winning driver of the Circuit of Lausitzring?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"race_calendar_and_winners\" WHERE \"circuit\"='lausitzring';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_radio\" (\n \"frequency\" real,\n \"callsign\" text,\n \"brand\" text,\n \"city_of_license\" text,\n \"website\" text,\n \"webcast\" text\n);\n\nQuestion: What is the city of txdot har?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"am_radio\" WHERE \"brand\"='txdot har';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"am_radio\" (\n \"frequency\" real,\n \"callsign\" text,\n \"brand\" text,\n \"city_of_license\" text,\n \"website\" text,\n \"webcast\" text\n);\n\nQuestion: What was radio mexicana's website?" }, { "role": "assistant", "content": "SELECT \"website\" FROM \"am_radio\" WHERE \"brand\"='radio mexicana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: Which player ranks higher than 9?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"rebounds\" WHERE \"rank\">9;" } ]
[ { "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 \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?" }, { "role": "assistant", "content": "SELECT \"gross_revenue_2011\" FROM \"box_office_score_data\" WHERE \"gross_revenue_1982\"='$156,315';" } ]
[ { "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 \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?" }, { "role": "assistant", "content": "SELECT \"gross_revenue_2011\" FROM \"box_office_score_data\" WHERE \"gross_revenue_1982\"='$156,315';" } ]
[ { "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 \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: How many tickets were sold / available for the venue that had a gross revenue of $333,100 in 2011?" }, { "role": "assistant", "content": "SELECT \"tickets_sold_available\" FROM \"box_office_score_data\" WHERE \"gross_revenue_2011\"='$333,100';" } ]
[ { "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 \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What is the venue in the city of Brussels, Belgium?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"box_office_score_data\" WHERE \"city\"='brussels, belgium';" } ]
[ { "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 \"tickets_sold_available\" text,\n \"gross_revenue_1982\" text,\n \"gross_revenue_2011\" text\n);\n\nQuestion: What venue had gross revenues of $1,325,153 in 2011?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"box_office_score_data\" WHERE \"gross_revenue_2011\"='$1,325,153';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2003_04\" text,\n \"2004_05\" text,\n \"2007_08\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What was held in 2003/04 when Former Ranking Tournaments was in 2007/08?" }, { "role": "assistant", "content": "SELECT \"2003_04\" FROM \"performance_and_rankings_timeline\" WHERE \"2007_08\"='former ranking tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2003_04\" text,\n \"2004_05\" text,\n \"2007_08\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What was held in 2009/10 with Former Ranking Tournaments in 2003/04?" }, { "role": "assistant", "content": "SELECT \"2009_10\" FROM \"performance_and_rankings_timeline\" WHERE \"2003_04\"='former ranking tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2003_04\" text,\n \"2004_05\" text,\n \"2007_08\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What was held in 2003/04 when 3R was in 2012?" }, { "role": "assistant", "content": "SELECT \"2003_04\" FROM \"performance_and_rankings_timeline\" WHERE \"2012_13\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2003_04\" text,\n \"2004_05\" text,\n \"2007_08\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What was held in 2009/10 when 2004/05 was Variant Format Tournaments?" }, { "role": "assistant", "content": "SELECT \"2009_10\" FROM \"performance_and_rankings_timeline\" WHERE \"2004_05\"='variant format tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"rockhampton\" real,\n \"livingstone\" real,\n \"fitzroy\" real,\n \"mt_morgan\" real\n);\n\nQuestion: How many people are in Livingstone when less than 6,406 are in Firzroy, less than 3,967 in Mt. Morgan, more than 52,383 in Rochhampton, and less than 102,048 in total region?" }, { "role": "assistant", "content": "SELECT COUNT(\"livingstone\") FROM \"population\" WHERE \"fitzroy\"<'6,406' AND \"mt_morgan\"<'3,967' AND \"rockhampton\">'52,383' AND \"total_region\"<'102,048';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"rockhampton\" real,\n \"livingstone\" real,\n \"fitzroy\" real,\n \"mt_morgan\" real\n);\n\nQuestion: How many people in the total region when there are more than 6,406 in Fitzroy, 27,017 in Livinstonge, and less than 58,382 in Rochhampton?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_region\") FROM \"population\" WHERE \"fitzroy\">'6,406' AND \"livingstone\"='27,017' AND \"rockhampton\"<'58,382';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"rockhampton\" real,\n \"livingstone\" real,\n \"fitzroy\" real,\n \"mt_morgan\" real\n);\n\nQuestion: How many people were in Mt Morgan earlier than 1933 when the Total Region had 44,501?" }, { "role": "assistant", "content": "SELECT COUNT(\"mt_morgan\") FROM \"population\" WHERE \"total_region\"='44,501' AND \"year\"<1933;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"rockhampton\" real,\n \"livingstone\" real,\n \"fitzroy\" real,\n \"mt_morgan\" real\n);\n\nQuestion: What is the sum of people in the total region when more than 5,060 were in Mt. Morgan?" }, { "role": "assistant", "content": "SELECT SUM(\"total_region\") FROM \"population\" WHERE \"mt_morgan\">'5,060';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the total swimsuit with Preliminaries smaller than 8.27?" }, { "role": "assistant", "content": "SELECT SUM(\"swimsuit\") FROM \"final_competition_scores\" WHERE \"preliminaries\"<8.27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What's the average interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842?" }, { "role": "assistant", "content": "SELECT AVG(\"interview\") FROM \"final_competition_scores\" WHERE \"preliminaries\">8.27 AND \"evening_gown\"=8.85 AND \"average\"<8.842;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: How many swimsuits have an Evening Gown larger than 9, and an Interview larger than 8.405?" }, { "role": "assistant", "content": "SELECT COUNT(\"swimsuit\") FROM \"final_competition_scores\" WHERE \"evening_gown\">9 AND \"interview\">8.405;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_census_statistics\" (\n \"rank_csa\" text,\n \"state_s\" text,\n \"2007_estimate\" text,\n \"2000_population\" text,\n \"percent_change_1990_2000\" text\n);\n\nQuestion: What is the 2000 population in OK with a 1990-2000 percent change of A078 +17.22%?" }, { "role": "assistant", "content": "SELECT \"2000_population\" FROM \"u_s_census_statistics\" WHERE \"state_s\"='ok' AND \"percent_change_1990_2000\"='a078 +17.22%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_census_statistics\" (\n \"rank_csa\" text,\n \"state_s\" text,\n \"2007_estimate\" text,\n \"2000_population\" text,\n \"percent_change_1990_2000\" text\n);\n\nQuestion: What is the 1990-2000 percent change of a result that is estimated to be 45,393 in 2007?" }, { "role": "assistant", "content": "SELECT \"percent_change_1990_2000\" FROM \"u_s_census_statistics\" WHERE \"2007_estimate\"='45,393';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_census_statistics\" (\n \"rank_csa\" text,\n \"state_s\" text,\n \"2007_estimate\" text,\n \"2000_population\" text,\n \"percent_change_1990_2000\" text\n);\n\nQuestion: What is the rank of a result with a population of 99,962 in 2000?" }, { "role": "assistant", "content": "SELECT \"rank_csa\" FROM \"u_s_census_statistics\" WHERE \"2000_population\"='99,962';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"for_top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: How many matches did goalkeeper Wilfredo Caballero have an average less than 1.11?" }, { "role": "assistant", "content": "SELECT SUM(\"matches\") FROM \"for_top_goalkeepers\" WHERE \"goalkeeper\"='wilfredo caballero' AND \"average\"<1.11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"for_top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the average goals less than 41 that goalkeeper Claudio Bravo had?" }, { "role": "assistant", "content": "SELECT COUNT(\"average\") FROM \"for_top_goalkeepers\" WHERE \"goals\"<41 AND \"goalkeeper\"='claudio bravo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"for_top_goalkeepers\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: What is the highest average of goals less than 45 for team Real Sociedad?" }, { "role": "assistant", "content": "SELECT MAX(\"average\") FROM \"for_top_goalkeepers\" WHERE \"goals\"<45 AND \"team\"='real sociedad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1405_1482\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_countess\" text,\n \"ceased_to_be_countess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the person born on 3 May 1446 cease to be countess?" }, { "role": "assistant", "content": "SELECT \"ceased_to_be_countess\" FROM \"1405_1482\" WHERE \"birth\"='3 may 1446';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1405_1482\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_countess\" text,\n \"ceased_to_be_countess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Who was the father of the person born in 1363?" }, { "role": "assistant", "content": "SELECT \"father\" FROM \"1405_1482\" WHERE \"birth\"='1363';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1405_1482\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_countess\" text,\n \"ceased_to_be_countess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When was the marriage of the person who died on 17 December 1471?" }, { "role": "assistant", "content": "SELECT \"marriage\" FROM \"1405_1482\" WHERE \"death\"='17 december 1471';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fed_cup_doubles_performances_0_5\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"partnering\" text,\n \"against\" text,\n \"surface\" text,\n \"opponents\" text,\n \"result\" text\n);\n\nQuestion: On what surface did Poland play as the against team?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"fed_cup_doubles_performances_0_5\" WHERE \"against\"='poland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fed_cup_doubles_performances_0_5\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"partnering\" text,\n \"against\" text,\n \"surface\" text,\n \"opponents\" text,\n \"result\" text\n);\n\nQuestion: Who was played against with a result of 3\u20136, 2\u20136?" }, { "role": "assistant", "content": "SELECT \"against\" FROM \"fed_cup_doubles_performances_0_5\" WHERE \"result\"='3\u20136, 2\u20136';" } ]
[ { "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: Name the least year for paris, france venue" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"venue\"='paris, france';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What's the total number of picks for mckinney high school?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"supplemental_first_round_selections\" WHERE \"school\"='mckinney high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What was the highest pick for the player Adam Jones?" }, { "role": "assistant", "content": "SELECT MAX(\"pick\") FROM \"supplemental_first_round_selections\" WHERE \"player\"='adam jones';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What's the total number of picks for the player Matt Murton?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"supplemental_first_round_selections\" WHERE \"player\"='matt murton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What position was pick 32?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"supplemental_first_round_selections\" WHERE \"pick\"=32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Who won at the Barbagallo Raceway circuit?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"circuit\"='barbagallo raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What was the title of the race at Oran Park Raceway?" }, { "role": "assistant", "content": "SELECT \"race_title\" FROM \"race_calendar\" WHERE \"circuit\"='oran park raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Who won at the Oran Park Raceway?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"circuit\"='oran park raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: When Jim Richards won at the Winton Motor Raceway circuit, what was the city and state listed?" }, { "role": "assistant", "content": "SELECT \"city_state\" FROM \"race_calendar\" WHERE \"winner\"='jim richards' AND \"circuit\"='winton motor raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_copper_producing_mines\" (\n \"rank\" text,\n \"mine\" text,\n \"county\" text,\n \"operator\" text,\n \"capacity_thousands_of_metric_tons\" text\n);\n\nQuestion: What is the capacity of the mine that is operated by Cyprus Amax minerals?" }, { "role": "assistant", "content": "SELECT \"capacity_thousands_of_metric_tons\" FROM \"leading_copper_producing_mines\" WHERE \"operator\"='cyprus amax minerals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_copper_producing_mines\" (\n \"rank\" text,\n \"mine\" text,\n \"county\" text,\n \"operator\" text,\n \"capacity_thousands_of_metric_tons\" text\n);\n\nQuestion: What rank is the Silver Bell mine of Pima county?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"leading_copper_producing_mines\" WHERE \"county\"='pima' AND \"mine\"='silver bell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leading_copper_producing_mines\" (\n \"rank\" text,\n \"mine\" text,\n \"county\" text,\n \"operator\" text,\n \"capacity_thousands_of_metric_tons\" text\n);\n\nQuestion: What is the capacity of the Pinto Valley mine in Gila county?" }, { "role": "assistant", "content": "SELECT \"capacity_thousands_of_metric_tons\" FROM \"leading_copper_producing_mines\" WHERE \"county\"='gila' AND \"mine\"='pinto valley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the first leg with an agg of 10-2?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"first_round\" WHERE \"agg\"='10-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the agg of team 2 for Vantour Club Mangoungou?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"first_round\" WHERE \"team_2\"='vantour club mangoungou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the first leg of team 1 for Hardware stars?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"first_round\" WHERE \"team_1\"='hardware stars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the agg with a second leg of 0-1?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"first_round\" WHERE \"2nd_leg\"='0-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What team 2 had a 1st leg of 1-1, and agg of 3-1?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"first_round\" WHERE \"1st_leg\"='1-1' AND \"agg\"='3-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What team 2 had a second leg of 3-2?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"first_round\" WHERE \"2nd_leg\"='3-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"date\" text,\n \"time\" text,\n \"round\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: On what date was the game played at home against the opponent Siena?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"matches\" WHERE \"opponent\"='siena' AND \"ground\"='home';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"date\" text,\n \"time\" text,\n \"round\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: What time was the game played against Cagliari that lasted 16 rounds?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"matches\" WHERE \"opponent\"='cagliari' AND \"round\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"date\" text,\n \"time\" text,\n \"round\" text,\n \"opponent\" text,\n \"ground\" text,\n \"score\" text\n);\n\nQuestion: Where was the game played that had a score of 3-2 and a time of 15:00 cet?" }, { "role": "assistant", "content": "SELECT \"ground\" FROM \"matches\" WHERE \"score\"='3-2' AND \"time\"='15:00 cet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score on April 18?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance when Nakamura (0-1) lost?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"loss\"='nakamura (0-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was their record when they lost with Lilly (0-1) pitching?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='lilly (0-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was their record when the attendance was 26,827?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='26,827';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Who is the December playmate with a February playmate Anne-Marie Fox?" }, { "role": "assistant", "content": "SELECT \"december\" FROM \"1980_1989\" WHERE \"february\"='anne-marie fox';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Who is the August playmate with the October playmate Shannon Long?" }, { "role": "assistant", "content": "SELECT \"august\" FROM \"1980_1989\" WHERE \"october\"='shannon long';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Who is the December playmate with a November playmate Marlene Janssen?" }, { "role": "assistant", "content": "SELECT \"december\" FROM \"1980_1989\" WHERE \"november\"='marlene janssen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Who is the November playmate with the July playmate Hope Marie Carlton?" }, { "role": "assistant", "content": "SELECT \"november\" FROM \"1980_1989\" WHERE \"july\"='hope marie carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Who is the March playmate with an August playmate Gianna Amore?" }, { "role": "assistant", "content": "SELECT \"march\" FROM \"1980_1989\" WHERE \"august\"='gianna amore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Who is the January playmate with the November playmate Donna Edmondson?" }, { "role": "assistant", "content": "SELECT \"january\" FROM \"1980_1989\" WHERE \"november\"='donna edmondson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_season\" (\n \"week\" real,\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the home stadium of the Tennessee Titans?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"2010_season\" WHERE \"host_team\"='tennessee titans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_season\" (\n \"week\" real,\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: When were the Houston Texans the visiting team later in the season?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"2010_season\" WHERE \"visiting_team\"='houston texans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_season\" (\n \"week\" real,\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: The final score was 24-34 on what date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2010_season\" WHERE \"final_score\"='24-34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_nation\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals won by nations that won 2 silver medals but fewer than 7 in total?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"performance_by_nation\" WHERE \"silver\"=2 AND \"total\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_nation\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of medals won by nations that had 7 bronze medals and more than 18 gold medals?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"performance_by_nation\" WHERE \"bronze\"=7 AND \"gold\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_nation\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation with Rank 1 won the fewest gold medals while winning more than 11 silver but fewer than 7 bronze medals?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"performance_by_nation\" WHERE \"silver\">11 AND \"rank\"='1' AND \"bronze\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_nation\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total medals won by a nation that had 7 bronze but more than 12 silver medals?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"performance_by_nation\" WHERE \"bronze\"=7 AND \"silver\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_by_nation\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation won the fewest gold medals while being in Rank 1, with a total of 37 medals and more than 7 bronze medals?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"performance_by_nation\" WHERE \"total\"=37 AND \"rank\"='1' AND \"bronze\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Name the score for yuliya ustyuzhanina" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_titles\" WHERE \"opponent\"='yuliya ustyuzhanina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Name the date for hard surface and tournament of fort walton beach" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"surface\"='hard' AND \"tournament\"='fort walton beach';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Name the opponent with score of 1\u20136, 6\u20134, 6\u20134" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_titles\" WHERE \"score\"='1\u20136, 6\u20134, 6\u20134';" } ]