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 \"200_or_more_deaths\" (\n \"disaster\" text,\n \"type\" text,\n \"location\" text,\n \"deaths\" text,\n \"date\" text\n);\n\nQuestion: Where was the disaster located that took place on 1916?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"200_or_more_deaths\" WHERE \"date\"='1916';" } ]
[ { "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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Laps is the highest one that has a Time/Retired of +3.370 secs?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"time_retired\"='+3.370 secs';" } ]
[ { "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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Grid has a Team of rusport, and Laps larger than 221?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"team\"='rusport' AND \"laps\">221;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1996_to_1999\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: What title has a producer of MAQ and Anna as a role?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"1996_to_1999\" WHERE \"producer\"='maq' AND \"role\"='anna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1996_to_1999\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: How many years was Kay Tagal Kang Hinintay directed by Rory Quintos and produced by Star Cinema?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"1996_to_1999\" WHERE \"producer\"='star cinema' AND \"director\"='rory quintos' AND \"title\"='kay tagal kang hinintay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1996_to_1999\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: Which title was directed by Joyce Bernal?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"1996_to_1999\" WHERE \"director\"='joyce bernal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"composer\" text,\n \"lyricist\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What song is it that artist morena camilleri does and has more than 38 points" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"results\" WHERE \"points\">38 AND \"artist\"='morena camilleri';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"composer\" text,\n \"lyricist\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of points for ray agius" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"results\" WHERE \"lyricist\"='ray agius';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins\" (\n \"season\" real,\n \"challenge\" text,\n \"class\" text,\n \"place\" real,\n \"name\" text\n);\n\nQuestion: What play did henry s. uber / betty uber (eng) finish in?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"wins\" WHERE \"name\"='henry s. uber / betty uber (eng)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members_of_the_howard_county_del\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: When Baltimore County, Howard are represented, what's the first elected when the committee is environmental matters (vice-chair)?" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"current_members_of_the_howard_county_del\" WHERE \"counties_represented\"='baltimore county, howard' AND \"committee\"='environmental matters (vice-chair)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members_of_the_howard_county_del\" (\n \"district\" text,\n \"counties_represented\" text,\n \"delegate\" text,\n \"party\" text,\n \"first_elected\" real,\n \"committee\" text\n);\n\nQuestion: What party is the delegate of Turner, Frank S. Frank S. Turner of Howard County?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"current_members_of_the_howard_county_del\" WHERE \"counties_represented\"='howard' AND \"delegate\"='turner, frank s. frank s. turner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1932_north_atlantic_tropical_cyclone_sta\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: What is the damage of storm three?" }, { "role": "assistant", "content": "SELECT \"damage_millions_usd\" FROM \"1932_north_atlantic_tropical_cyclone_sta\" WHERE \"storm_name\"='three';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Which Date has a MotoGP winner of casey stoner, and a 250cc winner of hiroshi aoyama?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"grands_prix\" WHERE \"moto_gp_winner\"='casey stoner' AND \"250cc_winner\"='hiroshi aoyama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Which 250cc winner has a 125cc winner of bradley smith, and a MotoGP winner of casey stoner?" }, { "role": "assistant", "content": "SELECT \"250cc_winner\" FROM \"grands_prix\" WHERE \"125cc_winner\"='bradley smith' AND \"moto_gp_winner\"='casey stoner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Which Round is the lowest one that has a Circuit of donington?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"grands_prix\" WHERE \"circuit\"='donington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Which MotoGP winner has a 250cc winner of marco simoncelli, and a Round of 15?" }, { "role": "assistant", "content": "SELECT \"moto_gp_winner\" FROM \"grands_prix\" WHERE \"250cc_winner\"='marco simoncelli' AND \"round\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Which 250cc winner has a 125cc winner of bradley smith, and a Circuit of mugello?" }, { "role": "assistant", "content": "SELECT \"250cc_winner\" FROM \"grands_prix\" WHERE \"125cc_winner\"='bradley smith' AND \"circuit\"='mugello';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Which 250cc winner has a Round larger than 6, and a Date of 26 july?" }, { "role": "assistant", "content": "SELECT \"250cc_winner\" FROM \"grands_prix\" WHERE \"round\">6 AND \"date\"='26 july';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Attendance of 48,510 had what highest week?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\"='48,510';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Opponent of at san francisco 49ers had what lowest week?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"opponent\"='at san francisco 49ers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: On what Date is the Minnesota Vikings the Opponent?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"preseason\" WHERE \"opponent\"='minnesota vikings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is the Date of Week 5?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"preseason\" WHERE \"week\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preseason\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is the Date of Week 2?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"preseason\" WHERE \"week\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the score when the game has a loss of Lary (10-12)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='lary (10-12)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the friendly match?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"competition\"='friendly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score of the match on June 4, 2008?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='june 4, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Which Year is the lowest one that has a Length of 3:50?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"official_versions\" WHERE \"length\"='3:50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Which Length has a Year of 2000?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"official_versions\" WHERE \"year\"=2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"melodifestivalen_2000\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: In what place is the artist Midnight Band with a draw larger than 2 and less than 139 points." }, { "role": "assistant", "content": "SELECT \"place\" FROM \"melodifestivalen_2000\" WHERE \"draw\">2 AND \"points\"<139 AND \"artist\"='midnight band';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_wickets_in_a_season\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"season\" text\n);\n\nQuestion: what player matched up with 9" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"most_wickets_in_a_season\" WHERE \"matches\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_stage\" (\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 2nd leg of the Internacional Team 1?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"first_stage\" WHERE \"team_1\"='internacional';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"davis_cup_and_federation_cup_venues\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Which Rank has a Capacity smaller than 12,000, and a Country of united states?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"davis_cup_and_federation_cup_venues\" WHERE \"capacity\"<'12,000' AND \"country\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"davis_cup_and_federation_cup_venues\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Which City has a Country of spain, and a Stadium of palacio de deportes de santander?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"davis_cup_and_federation_cup_venues\" WHERE \"country\"='spain' AND \"stadium\"='palacio de deportes de santander';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"davis_cup_and_federation_cup_venues\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Which Capacity is the lowest one that has a Rank smaller than 15, and a City of belgrade?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"davis_cup_and_federation_cup_venues\" WHERE \"rank\"<15 AND \"city\"='belgrade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"davis_cup_and_federation_cup_venues\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Which Capacity is the lowest one that has a City of brisbane, and a Rank smaller than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"davis_cup_and_federation_cup_venues\" WHERE \"city\"='brisbane' AND \"rank\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_table\" (\n \"club\" text,\n \"total_points\" text,\n \"bonus_points\" text,\n \"match_points\" text,\n \"games\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"diff\" text\n);\n\nQuestion: What are the total points that had 68 match points, 9 bonus points and 30 games?" }, { "role": "assistant", "content": "SELECT \"total_points\" FROM \"season_table\" WHERE \"games\"='30' AND \"bonus_points\"='9' AND \"match_points\"='68';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"name\" text,\n \"number\" real,\n \"from\" text,\n \"length_km\" real,\n \"length_mi\" real\n);\n\nQuestion: What's the shortest length from north klondike highway that has a length less than 326?" }, { "role": "assistant", "content": "SELECT MIN(\"length_km\") FROM \"see_also\" WHERE \"name\"='north klondike highway' AND \"length_mi\"<326;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: what team had a score of 2-1" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"score\"='2-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: what team played on may 11" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='may 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: what place has the club of sevilla" }, { "role": "assistant", "content": "SELECT \"away\" FROM \"matches\" WHERE \"club\"='sevilla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"new_conference\" text\n);\n\nQuestion: Which new conference is located in Greentown?" }, { "role": "assistant", "content": "SELECT \"new_conference\" FROM \"former_members\" WHERE \"location\"='greentown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"new_conference\" text\n);\n\nQuestion: What is the most current year with a previous conference of Mid-Indiana in Converse?" }, { "role": "assistant", "content": "SELECT MAX(\"year_joined\") FROM \"former_members\" WHERE \"previous_conference\"='mid-indiana' AND \"location\"='converse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"new_conference\" text\n);\n\nQuestion: What year did Culver leave?" }, { "role": "assistant", "content": "SELECT SUM(\"year_left\") FROM \"former_members\" WHERE \"location\"='culver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"new_conference\" text\n);\n\nQuestion: What is the mascot with a #/County of 34 Howard?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"num_county\"='34 howard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1968\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What day was a friendly game held that had a score of 2:3?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1968\" WHERE \"type_of_game\"='friendly' AND \"results\"='2:3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1968\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What type of game was held on December 22?" }, { "role": "assistant", "content": "SELECT \"type_of_game\" FROM \"1968\" WHERE \"date\"='december 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: what game had a doubles round in 1979" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"past_winners\" WHERE \"year\"=1979;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"date\" text,\n \"goals\" real,\n \"assists\" real,\n \"team\" text,\n \"venue\" text,\n \"opponent\" text,\n \"competition\" text,\n \"total_goals\" real,\n \"total_assists\" real\n);\n\nQuestion: Where were less than 72 goals made and more than 40 assists made?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"members\" WHERE \"goals\"<72 AND \"assists\">40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"date\" text,\n \"goals\" real,\n \"assists\" real,\n \"team\" text,\n \"venue\" text,\n \"opponent\" text,\n \"competition\" text,\n \"total_goals\" real,\n \"total_assists\" real\n);\n\nQuestion: Which opponent plays against the Pohang Steelers?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"members\" WHERE \"opponent\"='pohang steelers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"date\" text,\n \"goals\" real,\n \"assists\" real,\n \"team\" text,\n \"venue\" text,\n \"opponent\" text,\n \"competition\" text,\n \"total_goals\" real,\n \"total_assists\" real\n);\n\nQuestion: What competition had more than 40 assists?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"members\" WHERE \"assists\">40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: What Nation Placed 122.5?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"pairs\" WHERE \"places\"=122.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: What is the Places amount of the United States Ranking 8?" }, { "role": "assistant", "content": "SELECT AVG(\"places\") FROM \"pairs\" WHERE \"nation\"='united states' AND \"rank\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_series\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: What is the average episode number where jimmy mulville was the 4th performer?" }, { "role": "assistant", "content": "SELECT AVG(\"episode\") FROM \"radio_series\" WHERE \"performer_4\"='jimmy mulville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_series\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: What is the total number of episodes where hugh laurie was the 3rd performer?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"radio_series\" WHERE \"performer_3\"='hugh laurie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_series\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: What is the lowest episode number where john bird was the 4th performer?" }, { "role": "assistant", "content": "SELECT MIN(\"episode\") FROM \"radio_series\" WHERE \"performer_4\"='john bird';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_series\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: Who was the 3rd performer when Rory Bremner was the 4th performer?" }, { "role": "assistant", "content": "SELECT \"performer_3\" FROM \"radio_series\" WHERE \"performer_4\"='rory bremner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What time did the game featuring the Detroit Lions at Three Rivers Stadium occur?" }, { "role": "assistant", "content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"location\"='three rivers stadium' AND \"opponent\"='detroit lions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_configuration\" (\n \"rocket\" text,\n \"country\" text,\n \"type\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What is the highest number of successful launches associated with over 1 launch and under 0 fails?" }, { "role": "assistant", "content": "SELECT MAX(\"successes\") FROM \"by_configuration\" WHERE \"launches\">1 AND \"failures\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_configuration\" (\n \"rocket\" text,\n \"country\" text,\n \"type\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What are the fewest partial failures associated with 1 launch, India, gslv type, and a Rocket of gslv mk ii?" }, { "role": "assistant", "content": "SELECT MIN(\"partial_failures\") FROM \"by_configuration\" WHERE \"launches\"=1 AND \"country\"='india' AND \"type\"='gslv' AND \"rocket\"='gslv mk ii';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives_in_service\" (\n \"name\" text,\n \"locomotive_type\" text,\n \"wheel_arr\" text,\n \"builder\" text,\n \"year_built\" real,\n \"whistle\" text,\n \"in_traffic\" text\n);\n\nQuestion: What kind of locomotive is Winston Churchill?" }, { "role": "assistant", "content": "SELECT \"locomotive_type\" FROM \"locomotives_in_service\" WHERE \"name\"='winston churchill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many draws were there when there were points less than 23, 6 losses, and more than 21 against?" }, { "role": "assistant", "content": "SELECT COUNT(\"drawn\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"points\"<23 AND \"lost\"=6 AND \"against\">21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the smallest amount of draws when the position is less than 7 and the against is 19?" }, { "role": "assistant", "content": "SELECT MIN(\"drawn\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"position\"<7 AND \"against\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest amount of plays for fluminense?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"team\"='fluminense';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the least amount of points when there were less than 4 losses and less than 16 against?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"lost\"<4 AND \"against\"<16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"available_games\" (\n \"title\" text,\n \"publisher\" text,\n \"developer\" text,\n \"release_date\" text,\n \"esrb\" text\n);\n\nQuestion: Who does Rockstar Games use as a developer?" }, { "role": "assistant", "content": "SELECT \"developer\" FROM \"available_games\" WHERE \"publisher\"='rockstar games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"available_games\" (\n \"title\" text,\n \"publisher\" text,\n \"developer\" text,\n \"release_date\" text,\n \"esrb\" text\n);\n\nQuestion: When Did Microsoft Game Studios release Amped: Freestyle Snowboarding?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"available_games\" WHERE \"publisher\"='microsoft game studios' AND \"title\"='amped: freestyle snowboarding';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 10:30 has an 8:30 of la soir\u00e9e du hockey?" }, { "role": "assistant", "content": "SELECT \"10_30\" FROM \"saturday\" WHERE \"8_30\"='la soir\u00e9e du hockey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 7:30 has an 8:00 of movies & specials?" }, { "role": "assistant", "content": "SELECT \"7_30\" FROM \"saturday\" WHERE \"8_00\"='movies & specials';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 10:30 has an 7:30 of earth: final conflict?" }, { "role": "assistant", "content": "SELECT \"10_30\" FROM \"saturday\" WHERE \"7_30\"='earth: final conflict';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 8:00 has a 10:00 of movies & specials?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"saturday\" WHERE \"10_00\"='movies & specials';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 7:30 has a 10:30 of le grand journal?" }, { "role": "assistant", "content": "SELECT \"7_30\" FROM \"saturday\" WHERE \"10_30\"='le grand journal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: Which 7:00 has an 8:00 of la soir\u00e9e du hockey?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"saturday\" WHERE \"8_00\"='la soir\u00e9e du hockey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Score has a Home of quebec nordiques, and a Visitor of vancouver blazers on february 28?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"home\"='quebec nordiques' AND \"visitor\"='vancouver blazers' AND \"date\"='february 28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: When has a Visitor of new england whalers, and a Record of 9\u20139\u20131? Question 2" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='new england whalers' AND \"record\"='9\u20139\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Home has a Visitor of quebec nordiques, and a Score of 3\u20134, and a Record of 8\u20138\u20131?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"game_log\" WHERE \"visitor\"='quebec nordiques' AND \"score\"='3\u20134' AND \"record\"='8\u20138\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: WHich Score has a Record of 31\u201328\u20133?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='31\u201328\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: When has Score of 4\u20135, and a Record of 21\u201321\u20133?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='4\u20135' AND \"record\"='21\u201321\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of a Record 24\u201323\u20133?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='24\u201323\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: During which games did Tunisia win gold in the men's 5000 m?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"medalists\" WHERE \"event\"='men''s 5000 m' AND \"medal\"='gold';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What medal was won in the men's light welterweight event at the 1996 Atlanta games?" }, { "role": "assistant", "content": "SELECT \"medal\" FROM \"medalists\" WHERE \"event\"='men''s light welterweight' AND \"games\"='1996 atlanta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: At which games did Tunisia win a bronze in the men's 1500 m freestyle?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"medalists\" WHERE \"medal\"='bronze' AND \"event\"='men''s 1500 m freestyle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What medal was won in the men's 5000 m event?" }, { "role": "assistant", "content": "SELECT \"medal\" FROM \"medalists\" WHERE \"event\"='men''s 5000 m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What is on the at 8:00 on the same channel that has Costello on at 8:30?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"tuesday\" WHERE \"8_30\"='costello';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What is on at 7:30 on the same channel as Wheel of Fortune at 7:00?" }, { "role": "assistant", "content": "SELECT \"7_30\" FROM \"tuesday\" WHERE \"7_00\"='wheel of fortune';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What is on at 8:00 on the same change as W-Five at 10:00?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"tuesday\" WHERE \"10_00\"='w-five';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What is on at 9:30 on the same channel as Fin du Monde at 10:00?" }, { "role": "assistant", "content": "SELECT \"9_30\" FROM \"tuesday\" WHERE \"10_00\"='fin du monde';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tuesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What is on at 8:30 on the same channel as Les Machos at 9:00?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"tuesday\" WHERE \"9_00\"='les machos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"melodifestivalen_2001\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What is the draw with less than 107 points by the artist Jan Johansen?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"melodifestivalen_2001\" WHERE \"artist\"='jan johansen' AND \"points\"<107;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: In what Year did the Norton Team have 0 Points and 350cc Class?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='350cc' AND \"team\"='norton' AND \"points\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the Wins before 1960 with less than 2 Points?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"year\"<1960 AND \"points\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What was the earliest Year the Linto Team had less than 15 Points with more than 0 Wins?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\">0 AND \"team\"='linto' AND \"points\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What were the points for a team that 414 points against?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"2008_2009_table\" WHERE \"points_against\"='414';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: Who was the player that had drawn 1 and tried for 20?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"2008_2009_table\" WHERE \"drawn\"='1' AND \"tries_for\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What were the points for that had a game where there was 678 against?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"2008_2009_table\" WHERE \"points_against\"='678';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What were the points against in a game that was played correct as of 2009-05-16?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"2008_2009_table\" WHERE \"played\"='correct as of 2009-05-16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What was the tries again llanishen rfc?" }, { "role": "assistant", "content": "SELECT \"tries_against\" FROM \"2008_2009_table\" WHERE \"club\"='llanishen rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What was drawn for llanishen rfc?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"club\"='llanishen rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text\n);\n\nQuestion: Which District has a 2008 Status of re-election, and a Democratic david price?" }, { "role": "assistant", "content": "SELECT AVG(\"district\") FROM \"summary\" WHERE \"2008_status\"='re-election' AND \"democratic\"='david price';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text\n);\n\nQuestion: Which District has a Republican of dan mansell?" }, { "role": "assistant", "content": "SELECT AVG(\"district\") FROM \"summary\" WHERE \"republican\"='dan mansell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text\n);\n\nQuestion: Which Republican has a District of 10?" }, { "role": "assistant", "content": "SELECT \"republican\" FROM \"summary\" WHERE \"district\"=10;" } ]