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 \"1932_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the number of the tax supervising and conservation bill?" }, { "role": "assistant", "content": "SELECT MIN(\"meas_num\") FROM \"1932_general_election\" WHERE \"description\"='Tax Supervising and Conservation Bill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many ballot measures had a percentage yes of 52.11%?" }, { "role": "assistant", "content": "SELECT COUNT(\"passed\") FROM \"1954_general_election\" WHERE \"pct_yes\"='52.11%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the measure where the yes% is 44.06%?" }, { "role": "assistant", "content": "SELECT \"description\" FROM \"1954_general_election\" WHERE \"pct_yes\"='44.06%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many measures had a yes vote of 216545?" }, { "role": "assistant", "content": "SELECT COUNT(\"passed\") FROM \"1954_general_election\" WHERE \"yes_votes\"=216545;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1954_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the highest measure number?" }, { "role": "assistant", "content": "SELECT MAX(\"meas_num\") FROM \"1954_general_election\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What was the percentage of yes votes for the measure where the no votes number 199174?" }, { "role": "assistant", "content": "SELECT \"pct_yes\" FROM \"1962_general_election\" WHERE \"no_votes\"=199174;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many types are there for the measure where there were 312680 yes votes?" }, { "role": "assistant", "content": "SELECT COUNT(\"type\") FROM \"1962_general_election\" WHERE \"yes_votes\"=312680;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many figures are there for No votes for the Forest Rehabilitation Debt Limit Amendment?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_votes\") FROM \"1962_general_election\" WHERE \"description\"='Forest Rehabilitation Debt Limit Amendment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1962_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the type of measure that voted on the Power Development Debt Limit Amendment?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"1962_general_election\" WHERE \"description\"='Power Development Debt Limit Amendment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1956_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What vote passed for the measure with the description, authorizing state acceptance of certain gifts? " }, { "role": "assistant", "content": "SELECT \"passed\" FROM \"1956_general_election\" WHERE \"description\"='Authorizing State Acceptance of Certain Gifts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1956_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many votes passed are listed on the measure that had 390338 yes votes? " }, { "role": "assistant", "content": "SELECT COUNT(\"passed\") FROM \"1956_general_election\" WHERE \"yes_votes\"=390338;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1956_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What was the type when there were 175932 yes votes? " }, { "role": "assistant", "content": "SELECT \"type\" FROM \"1956_general_election\" WHERE \"yes_votes\"=175932;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1958_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the aggregate number of yes votes where no votes is littler than 299939.1619948521 and % yes is 66.49%" }, { "role": "assistant", "content": "SELECT COUNT(\"yes_votes\") FROM \"1958_general_election\" WHERE \"no_votes\"<299939.1619948521 AND \"pct_yes\"='66.49%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the description of the measure that got 78.27% yes votes?" }, { "role": "assistant", "content": "SELECT \"description\" FROM \"1970_general_election\" WHERE \"pct_yes\"='78.27%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the highest measure number?" }, { "role": "assistant", "content": "SELECT MAX(\"meas_num\") FROM \"1970_general_election\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many measures numbered 8 were a constitutional ammendment?" }, { "role": "assistant", "content": "SELECT COUNT(\"const_amd\") FROM \"1970_general_election\" WHERE \"meas_num\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1910_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many type classifications are given to the measure with the description, calling convention to revise state constitution? " }, { "role": "assistant", "content": "SELECT COUNT(\"type\") FROM \"1910_general_election\" WHERE \"description\"='Calling Convention to revise State Constitution';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1910_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the yes percentage in the measure that had 35270 yes votes? " }, { "role": "assistant", "content": "SELECT \"pct_yes\" FROM \"1910_general_election\" WHERE \"yes_votes\"=35270;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1910_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: Was the constitution amended for the measure with description , to annex part of Washington county to multnomah? " }, { "role": "assistant", "content": "SELECT \"const_amd\" FROM \"1910_general_election\" WHERE \"description\"='To Annex Part of Washington County to Multnomah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_1970_primary_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: When the no votes was 322682, what was the max meas. number?" }, { "role": "assistant", "content": "SELECT MAX(\"meas_num\") FROM \"may_1970_primary_election\" WHERE \"no_votes\"=322682;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_1974_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: Was the constitution amended on the measure described as authorizes bonds for water development fund? " }, { "role": "assistant", "content": "SELECT \"const_amd\" FROM \"may_1974_election\" WHERE \"description\"='Authorizes bonds for water development fund';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_1974_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How yes votes were there for measure 4? " }, { "role": "assistant", "content": "SELECT MAX(\"yes_votes\") FROM \"may_1974_election\" WHERE \"meas_num\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_1974_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: Was the constitution amended when the percentage of yes votes was 69.82%?" }, { "role": "assistant", "content": "SELECT \"const_amd\" FROM \"may_1974_election\" WHERE \"pct_yes\"='69.82%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_1974_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What was the lowest measure number? " }, { "role": "assistant", "content": "SELECT MIN(\"meas_num\") FROM \"may_1974_election\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1914_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What was the type of ballot measures if the % of yes vote is 32.47%?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"1914_general_election\" WHERE \"pct_yes\"='32.47%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1914_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What was the type of ballot measure with the description of Department of Industry and Public Works Amendment?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"1914_general_election\" WHERE \"description\"='Department of Industry and Public Works Amendment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1914_general_election\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many data are there under NO vote with a description of $1500 tax exemption amendment?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_votes\") FROM \"1914_general_election\" WHERE \"description\"='$1500 Tax Exemption Amendment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_256286_61\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the percentage of yes when there were 218846 yes votes" }, { "role": "assistant", "content": "SELECT \"pct_yes\" FROM \"table1_256286_61\" WHERE \"yes_votes\"=218846;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_256286_61\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: How many type catagories are listed when the percentage of yes is 68.91%?" }, { "role": "assistant", "content": "SELECT COUNT(\"type\") FROM \"table1_256286_61\" WHERE \"pct_yes\"='68.91%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_256286_61\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the type when yes votes are 546255? " }, { "role": "assistant", "content": "SELECT \"type\" FROM \"table1_256286_61\" WHERE \"yes_votes\"=546255;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_256286_61\" (\n \"meas_num\" real,\n \"passed\" text,\n \"yes_votes\" real,\n \"no_votes\" real,\n \"pct_yes\" text,\n \"const_amd\" text,\n \"type\" text,\n \"description\" text\n);\n\nQuestion: What is the measure number for the bill described as obscenity and sexual conduct bill? " }, { "role": "assistant", "content": "SELECT \"meas_num\" FROM \"table1_256286_61\" WHERE \"description\"='Obscenity and sexual conduct bill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_scoring_totals\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many points did art renner have?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"individual_scoring_totals\" WHERE \"player\"='Art Renner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_scoring_totals\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many touchdowns did bill culligan have?" }, { "role": "assistant", "content": "SELECT COUNT(\"touchdowns\") FROM \"individual_scoring_totals\" WHERE \"player\"='Bill Culligan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_scoring_totals\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What was the highest number of touchdowns by a player?" }, { "role": "assistant", "content": "SELECT MAX(\"touchdowns\") FROM \"individual_scoring_totals\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_scoring_totals\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many points did robert stenberg have?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"individual_scoring_totals\" WHERE \"player\"='Robert Stenberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_earthquakes\" (\n \"date\" text,\n \"origin_time\" text,\n \"epicentre_lat_s\" text,\n \"epicentre_long_e\" text,\n \"local_magnitude\" text,\n \"location\" text\n);\n\nQuestion: Where was the quake that began at 14:07?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"table_of_earthquakes\" WHERE \"origin_time\"='14:07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_earthquakes\" (\n \"date\" text,\n \"origin_time\" text,\n \"epicentre_lat_s\" text,\n \"epicentre_long_e\" text,\n \"local_magnitude\" text,\n \"location\" text\n);\n\nQuestion: What was the epicenter latitude for the quake that started at 17:09?" }, { "role": "assistant", "content": "SELECT \"epicentre_lat_s\" FROM \"table_of_earthquakes\" WHERE \"origin_time\"='17:09';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25649467_2\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_air_date\" text\n);\n\nQuestion: When \"pants on fire\" is the title what is the air date?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_25649467_2\" WHERE \"title\"='\\\"Pants on Fire\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25649467_2\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_air_date\" text\n);\n\nQuestion: When \"the charlotte letter\" is the title what is the air date?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_25649467_2\" WHERE \"title\"='\\\"The Charlotte Letter\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25649467_2\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_air_date\" text\n);\n\nQuestion: When \"the 37-year itch\" is the title what is the lowest series number?" }, { "role": "assistant", "content": "SELECT MIN(\"series_num\") FROM \"table1_25649467_2\" WHERE \"title\"='\\\"The 37-Year Itch\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25649467_2\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_air_date\" text\n);\n\nQuestion: When 12 is the season number how many series numbers are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"series_num\") FROM \"table1_25649467_2\" WHERE \"season_num\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who had the mountains classification when borut bo\u017ei\u010d was the winner?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"classification_leadership\" WHERE \"winner\"='Borut Bo\u017ei\u010d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What was the team classification where andr\u00e9 greipel was the winner and had the points classification?" }, { "role": "assistant", "content": "SELECT \"team_classification\" FROM \"classification_leadership\" WHERE \"winner\"='Andr\u00e9 Greipel' AND \"points_classification\"='Andr\u00e9 Greipel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: How many stages are there?" }, { "role": "assistant", "content": "SELECT MAX(\"stage\") FROM \"classification_leadership\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"sprint_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: How many sprint classifications are there where marco frapporti is the winner?" }, { "role": "assistant", "content": "SELECT COUNT(\"sprint_classification\") FROM \"classification_leadership\" WHERE \"winner\"='Marco Frapporti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"first_couple\" text,\n \"second_couple\" text,\n \"third_couple\" text,\n \"fourth_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" real\n);\n\nQuestion: Who was the second couple for the episode having an ITV1 ranking of 29?" }, { "role": "assistant", "content": "SELECT \"second_couple\" FROM \"series_1\" WHERE \"itv1_weekly_ranking\"=29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"first_couple\" text,\n \"second_couple\" text,\n \"third_couple\" text,\n \"fourth_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" real\n);\n\nQuestion: What is the maximum ITV1 weekly ranking?" }, { "role": "assistant", "content": "SELECT MAX(\"itv1_weekly_ranking\") FROM \"series_1\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"first_couple\" text,\n \"second_couple\" text,\n \"third_couple\" text,\n \"fourth_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" real\n);\n\nQuestion: What was the number of viewers for the episode having a fourth couple of Tony and Jamie?" }, { "role": "assistant", "content": "SELECT \"viewers_millions\" FROM \"series_1\" WHERE \"fourth_couple\"='Tony and Jamie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"first_couple\" text,\n \"second_couple\" text,\n \"third_couple\" text,\n \"fourth_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" real\n);\n\nQuestion: Who was the first couple in the episode having a fourth couple of Sammy and Nat?" }, { "role": "assistant", "content": "SELECT \"first_couple\" FROM \"series_1\" WHERE \"fourth_couple\"='Sammy and Nat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_1\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"first_couple\" text,\n \"second_couple\" text,\n \"third_couple\" text,\n \"fourth_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" real\n);\n\nQuestion: What is the minimum ITV1 ranking for the episode having viewership of 5.42 million?" }, { "role": "assistant", "content": "SELECT MIN(\"itv1_weekly_ranking\") FROM \"series_1\" WHERE \"viewers_millions\"='5.42';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25668962_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What episode number in the series was viewed by 13.66 million people in the U.S.?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_25668962_1\" WHERE \"u_s_viewers_million\"='13.66';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25668962_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many million U.S. viewers watched the epiode with a production code of 1arc12?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_25668962_1\" WHERE \"production_code\"='1ARC12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25668962_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many million U.S. viewers watched the episode with a production code of 1arc03?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_25668962_1\" WHERE \"production_code\"='1ARC03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25668962_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many million U.S. viewers watched episode number 6 in the series?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_25668962_1\" WHERE \"no_in_series\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25668962_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who directed episode number 18 in the series?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_25668962_1\" WHERE \"no_in_series\"=18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"1st_couple\" text,\n \"2nd_couple\" text,\n \"3rd_couple\" text,\n \"4th_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" text\n);\n\nQuestion: How many episode numbers are there on the show whose first couple was Stuart and Pegah>?" }, { "role": "assistant", "content": "SELECT COUNT(\"num\") FROM \"series_2\" WHERE \"1st_couple\"='Stuart and Pegah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"num\" real,\n \"airdate\" text,\n \"no_of_couples\" real,\n \"1st_couple\" text,\n \"2nd_couple\" text,\n \"3rd_couple\" text,\n \"4th_couple\" text,\n \"viewers_millions\" text,\n \"itv1_weekly_ranking\" text\n);\n\nQuestion: Who were the 3rd couple that were viewed by 4.89 million viewers? " }, { "role": "assistant", "content": "SELECT \"3rd_couple\" FROM \"series_2\" WHERE \"viewers_millions\"='4.89';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" text,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: What location(s) did patrick mckenna lead the most laps?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"race_calendar_and_results\" WHERE \"most_laps_led\"='Patrick McKenna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" text,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: How many races went for 10 rounds?" }, { "role": "assistant", "content": "SELECT COUNT(\"fastest_lap\") FROM \"race_calendar_and_results\" WHERE \"rnd\"='10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" text,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: Who had the most laps led in monterey, california when scott rarick won the race?" }, { "role": "assistant", "content": "SELECT \"most_laps_led\" FROM \"race_calendar_and_results\" WHERE \"location\"='Monterey, California' AND \"winning_driver\"='Scott Rarick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" text,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: What was the winning team when mikhail goikhberg was the winning driver?" }, { "role": "assistant", "content": "SELECT \"winning_team\" FROM \"race_calendar_and_results\" WHERE \"winning_driver\"='Mikhail Goikhberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25679312_2\" (\n \"series_num\" real,\n \"episode_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: Who directed the episode with the production code 10?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_25679312_2\" WHERE \"prod_code\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25679312_2\" (\n \"series_num\" real,\n \"episode_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: Who wrote the episode with production code 2?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_25679312_2\" WHERE \"prod_code\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25679312_2\" (\n \"series_num\" real,\n \"episode_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: Who wrote the episode with production code 5?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_25679312_2\" WHERE \"prod_code\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"history\" (\n \"edition\" text,\n \"class\" text,\n \"legs\" real,\n \"in_port_races\" text,\n \"entries\" text,\n \"start\" text,\n \"finish\" text,\n \"winning_yacht\" text,\n \"winning_skipper\" text\n);\n\nQuestion: Name the number of finishes for 15 entries 15 and l'esprit d'equipe" }, { "role": "assistant", "content": "SELECT COUNT(\"finish\") FROM \"history\" WHERE \"entries\"='15' AND \"winning_yacht\"='L''Esprit d''Equipe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"history\" (\n \"edition\" text,\n \"class\" text,\n \"legs\" real,\n \"in_port_races\" text,\n \"entries\" text,\n \"start\" text,\n \"finish\" text,\n \"winning_yacht\" text,\n \"winning_skipper\" text\n);\n\nQuestion: Name the most legs for steinlager 2" }, { "role": "assistant", "content": "SELECT MAX(\"legs\") FROM \"history\" WHERE \"winning_yacht\"='Steinlager 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"history\" (\n \"edition\" text,\n \"class\" text,\n \"legs\" real,\n \"in_port_races\" text,\n \"entries\" text,\n \"start\" text,\n \"finish\" text,\n \"winning_yacht\" text,\n \"winning_skipper\" text\n);\n\nQuestion: Name the wininng yacht for 14 entries" }, { "role": "assistant", "content": "SELECT \"winning_yacht\" FROM \"history\" WHERE \"entries\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_2\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the word for the episode that aired February 11? " }, { "role": "assistant", "content": "SELECT \"the_w_rd\" FROM \"table1_25691838_2\" WHERE \"original_airdate\"='February 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_2\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the introductory phrase for the episode with the production bode 6026?" }, { "role": "assistant", "content": "SELECT \"introductory_phrase\" FROM \"table1_25691838_2\" WHERE \"production_code\"=6026;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_2\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the word on episode number 673? " }, { "role": "assistant", "content": "SELECT \"the_w_rd\" FROM \"table1_25691838_2\" WHERE \"episode_num\"=673;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_2\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: Who were the guests in the episode with production code 6021? " }, { "role": "assistant", "content": "SELECT \"guest\" FROM \"table1_25691838_2\" WHERE \"production_code\"=6021;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_12\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: Who were the guests on a show where the production code is 6152?" }, { "role": "assistant", "content": "SELECT \"guest\" FROM \"table1_25691838_12\" WHERE \"production_code\"=6152;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_12\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: Who were the guests for the episode with an original airdate of december 07?" }, { "role": "assistant", "content": "SELECT \"guest\" FROM \"table1_25691838_12\" WHERE \"original_airdate\"='December 07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_12\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: How many introductory phrases are there with \"the w\u00f8rd\" is \"unrequited gov\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"introductory_phrase\") FROM \"table1_25691838_12\" WHERE \"the_w_rd\"='\\\"Unrequited Gov\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_12\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What is \"the w\u00f8rd\" when guests were daniel ellsberg , william wegman , julie taymor?" }, { "role": "assistant", "content": "SELECT \"the_w_rd\" FROM \"table1_25691838_12\" WHERE \"guest\"='Daniel Ellsberg , William Wegman , Julie Taymor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_12\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What is the production code of the episode with an original airdate of december 01?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"table1_25691838_12\" WHERE \"original_airdate\"='December 01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_12\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What is the episode # when the guests were julie nixon eisenhower and david eisenhower?" }, { "role": "assistant", "content": "SELECT MIN(\"episode_num\") FROM \"table1_25691838_12\" WHERE \"guest\"='Julie Nixon Eisenhower and David Eisenhower';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_8\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: Who were the guests on the episode that first aired August 16?" }, { "role": "assistant", "content": "SELECT \"guest\" FROM \"table1_25691838_8\" WHERE \"original_airdate\"='August 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_8\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the introductory phrase on the episode production code 6101?" }, { "role": "assistant", "content": "SELECT \"introductory_phrase\" FROM \"table1_25691838_8\" WHERE \"production_code\"=6101;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_8\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the smallest production code for August 11's original episode?" }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_25691838_8\" WHERE \"original_airdate\"='August 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_8\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: How many introductory phrases were there on David Finkel's guest episode?" }, { "role": "assistant", "content": "SELECT COUNT(\"introductory_phrase\") FROM \"table1_25691838_8\" WHERE \"guest\"='David Finkel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_8\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the minimum number of the episode that first aired August 11?" }, { "role": "assistant", "content": "SELECT MIN(\"episode_num\") FROM \"table1_25691838_8\" WHERE \"original_airdate\"='August 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25691838_8\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: Who were the guests for August 16's original episode?" }, { "role": "assistant", "content": "SELECT \"guest\" FROM \"table1_25691838_8\" WHERE \"original_airdate\"='August 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What was the introductory phrase for episode 794?" }, { "role": "assistant", "content": "SELECT \"introductory_phrase\" FROM \"november\" WHERE \"episode_num\"=794;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: What date did the episode originally air on with salvatore giunta as a guest?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"november\" WHERE \"guest\"='Salvatore Giunta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"episode_num\" real,\n \"the_w_rd\" text,\n \"guest\" text,\n \"introductory_phrase\" text,\n \"original_airdate\" text,\n \"production_code\" real\n);\n\nQuestion: How many production codes were there for the episode that aired on November 15?" }, { "role": "assistant", "content": "SELECT COUNT(\"production_code\") FROM \"november\" WHERE \"original_airdate\"='November 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_num7002\" (\n \"class\" text,\n \"firebox\" text,\n \"cylinder_size\" text,\n \"valves\" text,\n \"valve_gear\" text,\n \"number_built\" text,\n \"years_built\" text\n);\n\nQuestion: What was the cylinder size of this engine that was made with only 88 pieces?" }, { "role": "assistant", "content": "SELECT \"cylinder_size\" FROM \"engine_num7002\" WHERE \"number_built\"='88';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_num7002\" (\n \"class\" text,\n \"firebox\" text,\n \"cylinder_size\" text,\n \"valves\" text,\n \"valve_gear\" text,\n \"number_built\" text,\n \"years_built\" text\n);\n\nQuestion: What was the engine class that was built on 1906-08?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"engine_num7002\" WHERE \"years_built\"='1906-08';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_num7002\" (\n \"class\" text,\n \"firebox\" text,\n \"cylinder_size\" text,\n \"valves\" text,\n \"valve_gear\" text,\n \"number_built\" text,\n \"years_built\" text\n);\n\nQuestion: How many engines were built with a cylinder size of 20 \u00bd\u201d x 26\u201d, firebox is belpaire and valve gear is from Stephenson?" }, { "role": "assistant", "content": "SELECT \"number_built\" FROM \"engine_num7002\" WHERE \"cylinder_size\"='20 \u00bd\u201d x 26\u201d' AND \"firebox\"='Belpaire' AND \"valve_gear\"='Stephenson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_num7002\" (\n \"class\" text,\n \"firebox\" text,\n \"cylinder_size\" text,\n \"valves\" text,\n \"valve_gear\" text,\n \"number_built\" text,\n \"years_built\" text\n);\n\nQuestion: This engine with a cylinder size of 20 \u00bd\u201d x 26\u201d and a firebox of radial-stay was built when?" }, { "role": "assistant", "content": "SELECT \"years_built\" FROM \"engine_num7002\" WHERE \"cylinder_size\"='20 \u00bd\u201d x 26\u201d' AND \"firebox\"='Radial-stay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_num7002\" (\n \"class\" text,\n \"firebox\" text,\n \"cylinder_size\" text,\n \"valves\" text,\n \"valve_gear\" text,\n \"number_built\" text,\n \"years_built\" text\n);\n\nQuestion: How many types of valves were used on this engine that was built on 1902-05?" }, { "role": "assistant", "content": "SELECT COUNT(\"valves\") FROM \"engine_num7002\" WHERE \"years_built\"='1902-05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25692955_1\" (\n \"agency\" text,\n \"route_number\" text,\n \"north_east_terminal\" text,\n \"south_west_terminal\" text,\n \"more_information\" text\n);\n\nQuestion: Name the agency for santa rosa avenue" }, { "role": "assistant", "content": "SELECT \"agency\" FROM \"table1_25692955_1\" WHERE \"south_west_terminal\"='Santa Rosa Avenue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25692955_1\" (\n \"agency\" text,\n \"route_number\" text,\n \"north_east_terminal\" text,\n \"south_west_terminal\" text,\n \"more_information\" text\n);\n\nQuestion: Name the route number for rincon valley" }, { "role": "assistant", "content": "SELECT \"route_number\" FROM \"table1_25692955_1\" WHERE \"south_west_terminal\"='Rincon Valley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25692955_1\" (\n \"agency\" text,\n \"route_number\" text,\n \"north_east_terminal\" text,\n \"south_west_terminal\" text,\n \"more_information\" text\n);\n\nQuestion: Name the route number for santa rosa avenue" }, { "role": "assistant", "content": "SELECT \"route_number\" FROM \"table1_25692955_1\" WHERE \"north_east_terminal\"='Santa Rosa Avenue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_3_spearhead_in_hong_kong\" (\n \"episode_num\" text,\n \"original_air_date_uk\" text,\n \"episode_title\" text,\n \"director\" text,\n \"writer\" text,\n \"cast\" text\n);\n\nQuestion: What is the original air date of the episode \"Another Happy Day\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date_uk\" FROM \"series_3_spearhead_in_hong_kong\" WHERE \"episode_title\"='Another Happy Day';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_3_spearhead_in_hong_kong\" (\n \"episode_num\" text,\n \"original_air_date_uk\" text,\n \"episode_title\" text,\n \"director\" text,\n \"writer\" text,\n \"cast\" text\n);\n\nQuestion: What is the title of the episode that aired on 13 august 1981?" }, { "role": "assistant", "content": "SELECT \"episode_title\" FROM \"series_3_spearhead_in_hong_kong\" WHERE \"original_air_date_uk\"='13 August 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_3_spearhead_in_hong_kong\" (\n \"episode_num\" text,\n \"original_air_date_uk\" text,\n \"episode_title\" text,\n \"director\" text,\n \"writer\" text,\n \"cast\" text\n);\n\nQuestion: What is the original air date of episode 3-02?" }, { "role": "assistant", "content": "SELECT \"original_air_date_uk\" FROM \"series_3_spearhead_in_hong_kong\" WHERE \"episode_num\"='3-02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_3_spearhead_in_hong_kong\" (\n \"episode_num\" text,\n \"original_air_date_uk\" text,\n \"episode_title\" text,\n \"director\" text,\n \"writer\" text,\n \"cast\" text\n);\n\nQuestion: Who are the cast members of episode 3-04?" }, { "role": "assistant", "content": "SELECT \"cast\" FROM \"series_3_spearhead_in_hong_kong\" WHERE \"episode_num\"='3-04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25703_1\" (\n \"january_september_2013\" text,\n \"birth_2013\" real,\n \"birth_2012\" real,\n \"death_2013\" real,\n \"death_2012\" text\n);\n\nQuestion: What is the highest birth/2013 when the death/2012 is 14,1?" }, { "role": "assistant", "content": "SELECT MAX(\"birth_2013\") FROM \"table1_25703_1\" WHERE \"death_2012\"='14,1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_25703_1\" (\n \"january_september_2013\" text,\n \"birth_2013\" real,\n \"birth_2012\" real,\n \"death_2013\" real,\n \"death_2012\" text\n);\n\nQuestion: What is the highest death/2013 when the death/2012 is 12,7?" }, { "role": "assistant", "content": "SELECT MAX(\"death_2013\") FROM \"table1_25703_1\" WHERE \"death_2012\"='12,7';" } ]