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 \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which tyre is on the car driven by Pedro de la Rosa?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"drivers_and_constructors\" WHERE \"driver\"='pedro de la rosa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which constructor made the car with a rb1 chassis and which is driven by David Coulthard?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='rb1' AND \"driver\"='david coulthard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which constructor manufactured the car with a c24 chassis and which is driven by Jacques Villeneuve?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='c24' AND \"driver\"='jacques villeneuve';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What Region is the MHCL-20004 Catalog?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog\"='mhcl-20004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What region is the ALCA-272 Catalog?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog\"='alca-272';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What label is the ALCA-9197 Catalog?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='alca-9197';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date is the MHCL-20004 Catalog?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='mhcl-20004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date was the Ed Remaster CD and TOCT-24365 Catalog released?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='ed remaster cd' AND \"catalog\"='toct-24365';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1989\" (\n \"episode_title\" text,\n \"villain_s\" text,\n \"identity_ies\" text,\n \"reason_s\" text,\n \"original_airdate\" text,\n \"dvd_volume\" real\n);\n\nQuestion: What identities have more than 5 DVD volumes?" }, { "role": "assistant", "content": "SELECT \"identity_ies\" FROM \"season_2_1989\" WHERE \"dvd_volume\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1989\" (\n \"episode_title\" text,\n \"villain_s\" text,\n \"identity_ies\" text,\n \"reason_s\" text,\n \"original_airdate\" text,\n \"dvd_volume\" real\n);\n\nQuestion: How many DVD volumes was identified by Skippy Johnson?" }, { "role": "assistant", "content": "SELECT \"dvd_volume\" FROM \"season_2_1989\" WHERE \"identity_ies\"='skippy johnson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when St. Louis was the visiting team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"december\" WHERE \"visitor\"='st. louis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the decision when Chicago was the visiting team?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"december\" WHERE \"visitor\"='chicago';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score on December 3 when Detroit was the home team and Legace took the decision?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"december\" WHERE \"home\"='detroit' AND \"decision\"='legace' AND \"date\"='december 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record when Minnesota was the visiting team?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"december\" WHERE \"visitor\"='minnesota';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date was the record with catalog ALCA-275 released?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='alca-275';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What label released a record on March 25, 1984?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='march 25, 1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What label released a record on December 19, 2001?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='december 19, 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the catalog of the record released on May 27, 2009?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='may 27, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date was a record from Village Records with catalog VRCL-2205 released?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='village records' AND \"catalog\"='vrcl-2205';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date was the record with catalog ALCA-275 released?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='alca-275';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"position\" text,\n \"party\" text,\n \"took_office\" real,\n \"up_for_reelection\" real\n);\n\nQuestion: What was the earliest year that Yvette Alexander took office and was up for reelection after 2016?" }, { "role": "assistant", "content": "SELECT MIN(\"took_office\") FROM \"current_members\" WHERE \"name\"='yvette alexander' AND \"up_for_reelection\">2016;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"position\" text,\n \"party\" text,\n \"took_office\" real,\n \"up_for_reelection\" real\n);\n\nQuestion: What is the earliest year a Chairman who took office after 2011 is up for reelection?" }, { "role": "assistant", "content": "SELECT MIN(\"up_for_reelection\") FROM \"current_members\" WHERE \"took_office\">2011 AND \"position\"='chairman';" } ]
[ { "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 had less than 36 laps?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"<36;" } ]
[ { "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 was the most laps with a finish of 10 and qualification of 106.185?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"indy_500_results\" WHERE \"finish\"='10' AND \"qual\"='106.185';" } ]
[ { "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 is the most laps with a qualification of 106.185?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='106.185';" } ]
[ { "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: In what year were laps less than 64 and the finish at 25?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"<64 AND \"finish\"='25';" } ]
[ { "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 was the qualification in 1932?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1932';" } ]
[ { "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 was the start with a rank of 3 in 1936?" }, { "role": "assistant", "content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"rank\"='3' AND \"year\"='1936';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which 2nd leg came after a 1st leg of 0-3?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"round_16\" WHERE \"1st_leg\"='0-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: For a Team 1 of Al-Merrikh, what was the aggregate?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"round_16\" WHERE \"team_1\"='al-merrikh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who was the Team 1 for a 2nd leg of 1-4?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"round_16\" WHERE \"2nd_leg\"='1-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: For an aggregate of 1-3, what was the 2nd leg?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"round_16\" WHERE \"agg\"='1-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: For a team 2 of Al-Faisaly, what was the 2nd leg?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"round_16\" WHERE \"team_2\"='al-faisaly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upper_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: What years is the private school in upper hutt?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"upper_hutt_city\" WHERE \"area\"='upper hutt' AND \"authority\"='private';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upper_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: What school with a decile of 7 is in upper hutt?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"upper_hutt_city\" WHERE \"decile\"='7' AND \"area\"='upper hutt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upper_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: What authority is the coed school in pinehaven?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"upper_hutt_city\" WHERE \"gender\"='coed' AND \"area\"='pinehaven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upper_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: What years does plateau school serve?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"upper_hutt_city\" WHERE \"name\"='plateau school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"upper_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: Is Upper valley middle school public or private?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"upper_hutt_city\" WHERE \"name\"='upper valley middle school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record on June 13?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='june 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"orders\" (\n \"lot_no\" real,\n \"diagram\" real,\n \"mark\" text,\n \"builder\" text,\n \"fleet_numbers\" text,\n \"notes\" text\n);\n\nQuestion: Name the most lot number with notes of b4 bogies and diagram of 185" }, { "role": "assistant", "content": "SELECT MAX(\"lot_no\") FROM \"orders\" WHERE \"notes\"='b4 bogies' AND \"diagram\"=185;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"orders\" (\n \"lot_no\" real,\n \"diagram\" real,\n \"mark\" text,\n \"builder\" text,\n \"fleet_numbers\" text,\n \"notes\" text\n);\n\nQuestion: Name the fleet numbers for diagram of 186 and lot number of 30798" }, { "role": "assistant", "content": "SELECT \"fleet_numbers\" FROM \"orders\" WHERE \"diagram\"=186 AND \"lot_no\"=30798;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lines\" (\n \"direction\" text,\n \"name\" text,\n \"japanese\" text,\n \"terminals\" text,\n \"length_km\" real\n);\n\nQuestion: What line is 24.7 km and head towards Toyohashi East?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"lines\" WHERE \"direction\"='toyohashi east' AND \"length_km\"=24.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the record on November 18?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"date\"='november 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the record when attendance is more than 19,658 and Los Angeles Rams are the visiting team?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"attendance\">'19,658' AND \"visitor\"='los angeles rams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the average attendance when Chicago Bears were the home team?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"home\"='chicago bears';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the score when the record is 5-4-1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule\" WHERE \"record\"='5-4-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the largest number in attendance when the record is 1-1-0?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"record\"='1-1-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the GDP of the nation with 56,210,000 people?" }, { "role": "assistant", "content": "SELECT \"gdp_per_capita_us\" FROM \"1973_enlargement\" WHERE \"population\"='56,210,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the area of the nation with GDP per capita (US$) of 11,929?" }, { "role": "assistant", "content": "SELECT \"area_km\" FROM \"1973_enlargement\" WHERE \"gdp_per_capita_us\"='11,929';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the population of the nation that has a GDP per capita (US$) of 11,929?" }, { "role": "assistant", "content": "SELECT \"population\" FROM \"1973_enlargement\" WHERE \"gdp_per_capita_us\"='11,929';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the Population of the nation that has an Area (km\u00b2) of 70,273?" }, { "role": "assistant", "content": "SELECT \"population\" FROM \"1973_enlargement\" WHERE \"area_km\"='70,273';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1973_enlargement\" (\n \"member_countries\" text,\n \"population\" text,\n \"area_km\" text,\n \"gdp_billion_us\" text,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the Population of the nation that has a Member countries consisting of existing members (1973)?" }, { "role": "assistant", "content": "SELECT \"population\" FROM \"1973_enlargement\" WHERE \"member_countries\"='existing members (1973)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_broadcast_networks\" (\n \"television_network\" text,\n \"founded\" text,\n \"pct_of_venezuelan_households_reached\" text,\n \"num_of_households_viewable\" text,\n \"type_of_network\" text,\n \"num_of_full_power_affiliates\" text,\n \"num_of_low_power_class_a_affiliates_transmitters\" text\n);\n\nQuestion: What television network, founded in 2002, has a community type of network?" }, { "role": "assistant", "content": "SELECT \"television_network\" FROM \"table_of_broadcast_networks\" WHERE \"type_of_network\"='community' AND \"founded\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: At what stadium did the Green Bay Packers play an away game?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"1992\" WHERE \"visiting_team\"='green bay packers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: At what stadium was the final score 31-28?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"1992\" WHERE \"final_score\"='31-28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Which team hosted the Kansas City Chiefs?" }, { "role": "assistant", "content": "SELECT \"host_team\" FROM \"1992\" WHERE \"visiting_team\"='kansas city chiefs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What team hosted at Tampa Stadium?" }, { "role": "assistant", "content": "SELECT \"host_team\" FROM \"1992\" WHERE \"stadium\"='tampa stadium';" } ]
[ { "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: With a record of 43-26, what was the score that game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='43-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 \"record\" text\n);\n\nQuestion: On June 8, what's the loss when the Blue Jays played the Tigers?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"opponent\"='tigers' AND \"date\"='june 8';" } ]
[ { "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 date was the record 38-22?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='38-22';" } ]
[ { "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: The game that had a record of 39-25, what was the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='39-25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"epd_tour_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: Which runner-up has a 10 strokes margin of victory?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"epd_tour_6\" WHERE \"margin_of_victory\"='10 strokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which of the events only lasted no more than 0:55?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='0:55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which event only lasted for 3 rounds against Fernando Terere?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=3 AND \"opponent\"='fernando terere';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"part_time_teams\" (\n \"team\" text,\n \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text,\n \"rounds\" real\n);\n\nQuestion: What is the Primary Sponsor for the team owned by Randy Humphrey?" }, { "role": "assistant", "content": "SELECT \"primary_sponsor_s\" FROM \"part_time_teams\" WHERE \"owner_s\"='randy humphrey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"part_time_teams\" (\n \"team\" text,\n \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text,\n \"rounds\" real\n);\n\nQuestion: Who is the Driver on Bob Keselowski's team?" }, { "role": "assistant", "content": "SELECT \"driver_s\" FROM \"part_time_teams\" WHERE \"owner_s\"='bob keselowski';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"part_time_teams\" (\n \"team\" text,\n \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text,\n \"rounds\" real\n);\n\nQuestion: Walter Giles is Crew Chief of what team?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"part_time_teams\" WHERE \"crew_chief\"='walter giles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadia\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" real,\n \"club\" text,\n \"region\" text\n);\n\nQuestion: What club does the stadium stc krymteplitsia belong to?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"stadia\" WHERE \"stadium\"='stc krymteplitsia';" } ]
[ { "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 was Tony Bettenhausen's qualifying time in 1947?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1947';" } ]
[ { "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: Which year did Tony Bettenhausen complete more than 200 laps?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\">200;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the value in 2006 when 2003 was not held and 2012 was A?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"singles_performance_timeline\" WHERE \"2003\"='not held' AND \"2012\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the 2008 value when 2012 was Grand Slam Tournaments?" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2012\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the value in 2008 when 2012 was 1R, 2010 was A, and 2005 was A?" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2012\"='1r' AND \"2010\"='a' AND \"2005\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the value in 2003 when 2006 was WTA Premier Mandatory Tournaments?" }, { "role": "assistant", "content": "SELECT \"2003\" FROM \"singles_performance_timeline\" WHERE \"2006\"='wta premier mandatory tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the value in 2009 when 2005 was A for the Australian Open?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2005\"='a' AND \"tournament\"='australian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the value in 2012 when 2002 was Q1 and 2010 was 1R?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"2002\"='q1' AND \"2010\"='1r';" } ]
[ { "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 \"type\" text,\n \"elevation\" text,\n \"usgs_map\" text,\n \"gnis_id\" real\n);\n\nQuestion: What type has a GNIS ID of 1139805" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"see_also\" WHERE \"gnis_id\"=1139805;" } ]
[ { "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 \"type\" text,\n \"elevation\" text,\n \"usgs_map\" text,\n \"gnis_id\" real\n);\n\nQuestion: Which name has a USGS Map of clear lake?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"see_also\" WHERE \"usgs_map\"='clear lake';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the status of Norris?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"out\" WHERE \"name\"='norris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the source for Laird?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"out\" WHERE \"name\"='laird';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"great_northern_railway\" (\n \"class\" text,\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"date_made\" text,\n \"1958_ci\" text,\n \"1958_uta\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What 1958 CIE is class s?" }, { "role": "assistant", "content": "SELECT \"1958_ci\" FROM \"great_northern_railway\" WHERE \"class\"='s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"great_northern_railway\" (\n \"class\" text,\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"date_made\" text,\n \"1958_ci\" text,\n \"1958_uta\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What day withdrawn is associated with fleet numbers of 12, 25, 42\u201346, 50, 70\u201371, 74\u201377, 106\u2013107, 129?" }, { "role": "assistant", "content": "SELECT \"date_withdrawn\" FROM \"great_northern_railway\" WHERE \"fleet_numbers\"='12, 25, 42\u201346, 50, 70\u201371, 74\u201377, 106\u2013107, 129';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"earnings\" real\n);\n\nQuestion: Which player has a score of 74-74-73-70=291?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"score\"='74-74-73-70=291';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"earnings\" real\n);\n\nQuestion: What is the average earnings of a United States player who had a score of 72-68-74-72=286?" }, { "role": "assistant", "content": "SELECT AVG(\"earnings\") FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"score\"='72-68-74-72=286';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance at the game that had a loss of Mercker (3-1)?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"september\" WHERE \"loss\"='mercker (3-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance at the game that had a loss of Ayala (6-12)?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"september\" WHERE \"loss\"='ayala (6-12)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the loss of the game that had a score of 9-7?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"september\" WHERE \"score\"='9-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the loss of the game attended by 14,691?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"september\" WHERE \"attendance\"='14,691';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the loss of the game attended by 29,704?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"september\" WHERE \"attendance\"='29,704';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_results\" (\n \"date\" text,\n \"winner\" text,\n \"score\" text,\n \"location\" text,\n \"series\" text\n);\n\nQuestion: What is the Winner, when the Location is Clemson, SC, and when the Date is November 17, 2012?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"game_results\" WHERE \"location\"='clemson, sc' AND \"date\"='november 17, 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_results\" (\n \"date\" text,\n \"winner\" text,\n \"score\" text,\n \"location\" text,\n \"series\" text\n);\n\nQuestion: What is the Location, when the Score is 38-29?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_results\" WHERE \"score\"='38-29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_results\" (\n \"date\" text,\n \"winner\" text,\n \"score\" text,\n \"location\" text,\n \"series\" text\n);\n\nQuestion: What is the Location, when the Score is 35-31?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_results\" WHERE \"score\"='35-31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_results\" (\n \"date\" text,\n \"winner\" text,\n \"score\" text,\n \"location\" text,\n \"series\" text\n);\n\nQuestion: What is the Score, when the Location is Clemson, SC, when the Winner is Clemson, and when the Date is November 11, 2006?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_results\" WHERE \"location\"='clemson, sc' AND \"winner\"='clemson' AND \"date\"='november 11, 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What year did finish 1st in LMP1 class?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"complete_24_hours_of_le_mans_results\" WHERE \"class\"='lmp1' AND \"class_pos\"='1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the game result on November 16, 1969?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"regular_season\" WHERE \"date\"='november 16, 1969';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the general classification of stage 3" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: How many points did lech piasecki, stephen roche, and carrera jeans-vagabond have?" }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"classification_leadership_by_stage\" WHERE \"young_rider_classification\"='lech piasecki' AND \"general_classification\"='stephen roche' AND \"winner\"='carrera jeans-vagabond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What venue was the 11 September 2012 game?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='11 september 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kaikoura_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the lowest Decile for a school with a roll smaller than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"decile\") FROM \"kaikoura_district\" WHERE \"roll\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kaikoura_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the Gender of students at a school with a Decile of 5 and a Roll of 90?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"kaikoura_district\" WHERE \"decile\"=5 AND \"roll\"=90;" } ]