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 \"1978_pittsburgh_steelers_draft_selection\" (\n \"round\" real,\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text,\n \"tenure_w_steelers\" text\n);\n\nQuestion: What pick number was from the college of maryland and was picked in a round larger than 7?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"1978_pittsburgh_steelers_draft_selection\" WHERE \"round\">7 AND \"college\"='maryland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How much Overall has a Pick # of 26?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"=26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a Round smaller than 14, and a College of illinois?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"atlanta_falcons_draft_history\" WHERE \"round\"<14 AND \"college\"='illinois';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How much Overall has a Round smaller than 6, and a Pick # of 26?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"round\"<6 AND \"pick_num\"=26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Roy Hall's highest round?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='roy hall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How much Overall has a Pick # larger than 2, and a Name of claude humphrey?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">2 AND \"name\"='claude humphrey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the oppenent when the score was 5\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"score\"='5\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the opponent before game 57 when the score was 4\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"game\"<57 AND \"score\"='4\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the score when the points are larger than 74 and the game is 57?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"points\">74 AND \"game\"=57;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: When is the latest year that an entrant has toro rosso str1 chassis and under 1 point?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='toro rosso str1' AND \"points\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many entrants have a mercedes fo 108w 2.4l v8 engine and over 0 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_results\" WHERE \"engine\"='mercedes fo 108w 2.4l v8' AND \"points\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the engine for the car with 3 points?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"points\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"duratec_ti_vct\" (\n \"code\" text,\n \"years\" text,\n \"displacement_bore_x_stroke_type\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text,\n \"compression_1\" text\n);\n\nQuestion: Code of 1.6 duratec ti-vct, and a Power@rpm of ps (kw; hp)@6300 has what torque@rpm?"
},
{
"role": "assistant",
"content": "SELECT \"torque_rpm\" FROM \"duratec_ti_vct\" WHERE \"code\"='1.6 duratec ti-vct' AND \"power_rpm\"='ps (kw; hp)@6300';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"duratec_ti_vct\" (\n \"code\" text,\n \"years\" text,\n \"displacement_bore_x_stroke_type\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text,\n \"compression_1\" text\n);\n\nQuestion: Code of 1.6 duratec ti-vct, and a Power@rpm of ps (kw; hp)@6000 has what torque@rpm?"
},
{
"role": "assistant",
"content": "SELECT \"torque_rpm\" FROM \"duratec_ti_vct\" WHERE \"code\"='1.6 duratec ti-vct' AND \"power_rpm\"='ps (kw; hp)@6000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"duratec_ti_vct\" (\n \"code\" text,\n \"years\" text,\n \"displacement_bore_x_stroke_type\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text,\n \"compression_1\" text\n);\n\nQuestion: torque@rpm of n\u00b7m (lb\u00b7ft)@4050 has what code?"
},
{
"role": "assistant",
"content": "SELECT \"code\" FROM \"duratec_ti_vct\" WHERE \"torque_rpm\"='n\u00b7m (lb\u00b7ft)@4050';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_tourism_expenditure_2012\" (\n \"rank\" real,\n \"country\" text,\n \"unwto_region\" text,\n \"international_tourism_expenditure_2012\" text,\n \"international_tourism_expenditure_2011\" text\n);\n\nQuestion: Which International tourism expenditure (2012) has an International tourism expenditure (2011) of $33.3 billion?"
},
{
"role": "assistant",
"content": "SELECT \"international_tourism_expenditure_2012\" FROM \"international_tourism_expenditure_2012\" WHERE \"international_tourism_expenditure_2011\"='$33.3 billion';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_tourism_expenditure_2012\" (\n \"rank\" real,\n \"country\" text,\n \"unwto_region\" text,\n \"international_tourism_expenditure_2012\" text,\n \"international_tourism_expenditure_2011\" text\n);\n\nQuestion: What is Italy's UNWTO region?"
},
{
"role": "assistant",
"content": "SELECT \"unwto_region\" FROM \"international_tourism_expenditure_2012\" WHERE \"country\"='italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_tourism_expenditure_2012\" (\n \"rank\" real,\n \"country\" text,\n \"unwto_region\" text,\n \"international_tourism_expenditure_2012\" text,\n \"international_tourism_expenditure_2011\" text\n);\n\nQuestion: What is China's International tourism expenditure (2011)?"
},
{
"role": "assistant",
"content": "SELECT \"international_tourism_expenditure_2011\" FROM \"international_tourism_expenditure_2012\" WHERE \"country\"='china';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_and_blu_ray_releases\" (\n \"dvd_season\" text,\n \"format\" text,\n \"num_episodes\" real,\n \"num_disc_s\" real,\n \"region_4\" text\n);\n\nQuestion: What was the format for the 4 disc season that had less than 22 episodes and n/a for region 4?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"dvd_and_blu_ray_releases\" WHERE \"num_episodes\"<22 AND \"num_disc_s\"=4 AND \"region_4\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest Top-25 for the open championship, with a Top-10 larger than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"top_25\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"top_10\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the highest Top-5 when the Tournament is the open championship, with a Top-25 less than 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_5\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"top_25\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average Top-25 that has a Top-10 less than 7, and the Tournament is the open championship, with a Top-5more than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"top_10\"<7 AND \"tournament\"='the open championship' AND \"top_5\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total number of Top-5 when the Top-25 is 6, and a Cuts made are less than 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"top_5\") FROM \"summary\" WHERE \"top_25\"=6 AND \"cuts_made\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Which date had a home team of the Wizards?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"february\" WHERE \"home\"='wizards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the latest week with a date of November 12, 1967 and less than 34,761 in attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"season_schedule\" WHERE \"date\"='november 12, 1967' AND \"attendance\"<'34,761';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the date for the game with an opponent of the Houston Oilers from before week 3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"week\"<3 AND \"opponent\"='houston oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the total for New York's game?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"team\"='new york';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What round was a player from Indiana picked?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"college\"='indiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall_results_in_the_ipl\" (\n \"year\" text,\n \"total\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"pct_win\" text\n);\n\nQuestion: How many losses had a total of 17 and more than 10 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"overall_results_in_the_ipl\" WHERE \"total\"=17 AND \"wins\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall_results_in_the_ipl\" (\n \"year\" text,\n \"total\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"pct_win\" text\n);\n\nQuestion: What is the win percentage when there's more than 16 totals and less than 7 losses?"
},
{
"role": "assistant",
"content": "SELECT \"pct_win\" FROM \"overall_results_in_the_ipl\" WHERE \"total\">16 AND \"losses\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall_results_in_the_ipl\" (\n \"year\" text,\n \"total\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"pct_win\" text\n);\n\nQuestion: What is the smallest no result when the year was 2012 and there were more than 10 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_result\") FROM \"overall_results_in_the_ipl\" WHERE \"year\"='2012' AND \"wins\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1924_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"workers_ticket\" text\n);\n\nQuestion: What is the name on the Socialist ticket when the Democratic ticket is george k. shuler?"
},
{
"role": "assistant",
"content": "SELECT \"socialist_ticket\" FROM \"1924_state_election_results\" WHERE \"democratic_ticket\"='george k. shuler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1924_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"workers_ticket\" text\n);\n\nQuestion: What is the name on the Democratic ticket when the Workers ticket is franklin p. brill?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_ticket\" FROM \"1924_state_election_results\" WHERE \"workers_ticket\"='franklin p. brill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1924_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"workers_ticket\" text\n);\n\nQuestion: What is the name on the Democratic ticket when the Workers ticket is james p. cannon?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_ticket\" FROM \"1924_state_election_results\" WHERE \"workers_ticket\"='james p. cannon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1924_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"workers_ticket\" text\n);\n\nQuestion: What is the Office when the Republican ticket shows seymour lowman?"
},
{
"role": "assistant",
"content": "SELECT \"office\" FROM \"1924_state_election_results\" WHERE \"republican_ticket\"='seymour lowman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1924_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"workers_ticket\" text\n);\n\nQuestion: What is the name on the Republican ticket when the Socialist ticket was louis waldman?"
},
{
"role": "assistant",
"content": "SELECT \"republican_ticket\" FROM \"1924_state_election_results\" WHERE \"socialist_ticket\"='louis waldman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1924_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"workers_ticket\" text\n);\n\nQuestion: What is the name on the Republican ticket when the Workers ticket is edward lindgren?"
},
{
"role": "assistant",
"content": "SELECT \"republican_ticket\" FROM \"1924_state_election_results\" WHERE \"workers_ticket\"='edward lindgren';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"law_preservation_ticket\" text,\n \"socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who's the Democratic ticket with a Socialist Labor ticket of belle j. rosen?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_ticket\" FROM \"1930_state_election_results\" WHERE \"socialist_labor_ticket\"='belle j. rosen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"law_preservation_ticket\" text,\n \"socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who's the Socialist Labor ticket with a Republican ticket of cuthbert w. pound?"
},
{
"role": "assistant",
"content": "SELECT \"socialist_labor_ticket\" FROM \"1930_state_election_results\" WHERE \"republican_ticket\"='cuthbert w. pound';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"law_preservation_ticket\" text,\n \"socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Which Office has a Republican ticket of daniel h. conway?"
},
{
"role": "assistant",
"content": "SELECT \"office\" FROM \"1930_state_election_results\" WHERE \"republican_ticket\"='daniel h. conway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"law_preservation_ticket\" text,\n \"socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who's the Socialist ticket with a Law Preservation ticket of (none), and a Socialist Labor ticket of belle j. rosen?"
},
{
"role": "assistant",
"content": "SELECT \"socialist_ticket\" FROM \"1930_state_election_results\" WHERE \"law_preservation_ticket\"='(none)' AND \"socialist_labor_ticket\"='belle j. rosen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"law_preservation_ticket\" text,\n \"socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Which Office has a Democratic ticket of herbert h. lehman?"
},
{
"role": "assistant",
"content": "SELECT \"office\" FROM \"1930_state_election_results\" WHERE \"democratic_ticket\"='herbert h. lehman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"law_preservation_ticket\" text,\n \"socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who's the Socialist ticket with a Socialist Labor ticket of charles m. carlson?"
},
{
"role": "assistant",
"content": "SELECT \"socialist_ticket\" FROM \"1930_state_election_results\" WHERE \"socialist_labor_ticket\"='charles m. carlson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_table\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: Which bowl game has a season greater than 2008, with new orleans, Louisiana as the location?"
},
{
"role": "assistant",
"content": "SELECT \"bowl_game\" FROM \"summary_table\" WHERE \"season\">2008 AND \"location\"='new orleans, louisiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_table\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: What result has 1947 sun bowl as the bowl game?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"summary_table\" WHERE \"bowl_game\"='1947 sun bowl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_table\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: What result has texas longhorns as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"summary_table\" WHERE \"opponent\"='texas longhorns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_table\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: What location has 51,212 as the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"summary_table\" WHERE \"attendance\"='51,212';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text\n);\n\nQuestion: Who was the 3rd place team in the season in which Real Madrid finished 2nd?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_place\" FROM \"by_season\" WHERE \"2nd_place\"='real madrid';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text\n);\n\nQuestion: Which season had a 3rd place of CSKA Moscow and 1st place of Panathinaikos?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"by_season\" WHERE \"3rd_place\"='cska moscow' AND \"1st_place\"='panathinaikos';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"afternoon\" (\n \"time\" text,\n \"12_00_pm\" text,\n \"01_00_pm\" text,\n \"02_00_pm\" text,\n \"03_00_pm\" text,\n \"04_00_pm\" text,\n \"05_00_pm\" text,\n \"05_55_pm\" text\n);\n\nQuestion: Who preforms at 2:00PM on Monday?"
},
{
"role": "assistant",
"content": "SELECT \"02_00_pm\" FROM \"afternoon\" WHERE \"time\"='monday';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"afternoon\" (\n \"time\" text,\n \"12_00_pm\" text,\n \"01_00_pm\" text,\n \"02_00_pm\" text,\n \"03_00_pm\" text,\n \"04_00_pm\" text,\n \"05_00_pm\" text,\n \"05_55_pm\" text\n);\n\nQuestion: Who preforms at 3:00PM on Tuesday?"
},
{
"role": "assistant",
"content": "SELECT \"03_00_pm\" FROM \"afternoon\" WHERE \"time\"='tuesday';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"afternoon\" (\n \"time\" text,\n \"12_00_pm\" text,\n \"01_00_pm\" text,\n \"02_00_pm\" text,\n \"03_00_pm\" text,\n \"04_00_pm\" text,\n \"05_00_pm\" text,\n \"05_55_pm\" text\n);\n\nQuestion: Who preforms at 5:55PM on Monday?"
},
{
"role": "assistant",
"content": "SELECT \"05_55_pm\" FROM \"afternoon\" WHERE \"time\"='monday';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"20_questions\" text,\n \"pictorials\" text\n);\n\nQuestion: Which Pictorials is on 5-01?"
},
{
"role": "assistant",
"content": "SELECT \"pictorials\" FROM \"2001\" WHERE \"date\"='5-01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"20_questions\" text,\n \"pictorials\" text\n);\n\nQuestion: Which Cover model has a Pictorials of brande roderick-pmoy, naked news?"
},
{
"role": "assistant",
"content": "SELECT \"cover_model\" FROM \"2001\" WHERE \"pictorials\"='brande roderick-pmoy, naked news';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"20_questions\" text,\n \"pictorials\" text\n);\n\nQuestion: which Cover model has a Centerfold model of jennifer walcott?"
},
{
"role": "assistant",
"content": "SELECT \"cover_model\" FROM \"2001\" WHERE \"centerfold_model\"='jennifer walcott';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"20_questions\" text,\n \"pictorials\" text\n);\n\nQuestion: Which over model has a 20 Questions of edward burns?"
},
{
"role": "assistant",
"content": "SELECT \"cover_model\" FROM \"2001\" WHERE \"20_questions\"='edward burns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"20_questions\" text,\n \"pictorials\" text\n);\n\nQuestion: Which Centerfold model has a Cover model of irina voronina?"
},
{
"role": "assistant",
"content": "SELECT \"centerfold_model\" FROM \"2001\" WHERE \"cover_model\"='irina voronina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"20_questions\" text,\n \"pictorials\" text\n);\n\nQuestion: Which Centerfold model has a Date of 3-01?"
},
{
"role": "assistant",
"content": "SELECT \"centerfold_model\" FROM \"2001\" WHERE \"date\"='3-01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: What is the score on 15 Aug with a 17:30 time?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"pool_f\" WHERE \"date\"='15 aug' AND \"time\"='17:30';"
}
] |
[
{
"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: What is the total number of round values that had opponents named Paul Sutherland?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='paul sutherland';"
}
] |
[
{
"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 opponent led to a record of 10-6?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='10-6';"
}
] |
[
{
"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 method led to a record of 9-4?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='9-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_8_2_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What song had an index of m6?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"episode_8_2_march_2008\" WHERE \"index\"='m6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_8_2_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: For which song was the score 6.5 + 6.0 + 6.0 + 5.5 = 24.0?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"episode_8_2_march_2008\" WHERE \"score\"='6.5 + 6.0 + 6.0 + 5.5 = 24.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: When the played number is less than 8 and against is 23, what is the least amount of points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"torneio_rio_s_o_paulo\" WHERE \"against\"=23 AND \"played\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: When the corinthians have a position of less than 5, what is the average against?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"position\"<5 AND \"team\"='corinthians';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What position has less than 6 Points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"torneio_rio_s_o_paulo\" WHERE \"points\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the number of against when the difference is 10 and played is greater than 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"difference\"='10' AND \"played\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_stakes_with_congregations_in_arkan\" (\n \"stake\" text,\n \"organized\" text,\n \"number_of_wards_branches_in_arkansas\" real,\n \"stake_president\" text,\n \"occupation\" text\n);\n\nQuestion: What was the stake president when the organized date is April 18, 1965?"
},
{
"role": "assistant",
"content": "SELECT \"stake_president\" FROM \"other_stakes_with_congregations_in_arkan\" WHERE \"organized\"='april 18, 1965';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_stakes_with_congregations_in_arkan\" (\n \"stake\" text,\n \"organized\" text,\n \"number_of_wards_branches_in_arkansas\" real,\n \"stake_president\" text,\n \"occupation\" text\n);\n\nQuestion: What is the organized section when the stake president was henry john platt?"
},
{
"role": "assistant",
"content": "SELECT \"organized\" FROM \"other_stakes_with_congregations_in_arkan\" WHERE \"stake_president\"='henry john platt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What is the name of the award given for the category Mercury Prize?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"category\"='mercury prize';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: How many years has the Mercury Prize award been given?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"awards_and_nominations\" WHERE \"award\"='mercury prize';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: For how many years has the Mercury Prize been awarded?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"awards_and_nominations\" WHERE \"award\"='mercury prize';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: In what year, prior to 2009, was the Mercury Prize awarded?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"year\"<2009 AND \"award\"='mercury prize';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest Points when against is 50, and there are less than 20 played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"campeonato_paulista\" WHERE \"against\"=50 AND \"played\"<20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average Position with less than 57 against and the team is Juventus?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"campeonato_paulista\" WHERE \"against\"<57 AND \"team\"='juventus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest Position when the against is less than 41, and lost is more than 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"campeonato_paulista\" WHERE \"against\"<41 AND \"lost\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average Lost when there are 57 against?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"campeonato_paulista\" WHERE \"against\"=57;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest Lost for s\u00e3o paulo railway, Points more than 21?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"campeonato_paulista\" WHERE \"team\"='s\u00e3o paulo railway' AND \"points\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What unit is in Mongolia?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"newly_named_birds\" WHERE \"location\"='mongolia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What unit is in Argentina?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"newly_named_birds\" WHERE \"location\"='argentina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What name is located in China?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"newly_named_birds\" WHERE \"location\"='china';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What unit is located in China and has Zhou Zhang as an author?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"newly_named_birds\" WHERE \"location\"='china' AND \"authors\"='zhou zhang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What kind of Manufacturer has a Laps smaller than 20 and a Grid of 21"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"250cc_classification\" WHERE \"laps\"<20 AND \"grid\"=21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commercial_airlines\" (\n \"airline\" text,\n \"icao\" text,\n \"iata\" text,\n \"callsign\" text,\n \"commenced_operations\" real,\n \"fleet_size\" real,\n \"headquarters\" text\n);\n\nQuestion: Which Airline has a Fleet size larger than 17, and a IATA of pr?"
},
{
"role": "assistant",
"content": "SELECT \"airline\" FROM \"commercial_airlines\" WHERE \"fleet_size\">17 AND \"iata\"='pr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commercial_airlines\" (\n \"airline\" text,\n \"icao\" text,\n \"iata\" text,\n \"callsign\" text,\n \"commenced_operations\" real,\n \"fleet_size\" real,\n \"headquarters\" text\n);\n\nQuestion: Which ICAO has a Fleet size of 2?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"commercial_airlines\" WHERE \"fleet_size\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commercial_airlines\" (\n \"airline\" text,\n \"icao\" text,\n \"iata\" text,\n \"callsign\" text,\n \"commenced_operations\" real,\n \"fleet_size\" real,\n \"headquarters\" text\n);\n\nQuestion: What is the of Fleet size with a IATA of pr, and a Commenced operations smaller than 1941?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"fleet_size\") FROM \"commercial_airlines\" WHERE \"iata\"='pr' AND \"commenced_operations\"<1941;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commercial_airlines\" (\n \"airline\" text,\n \"icao\" text,\n \"iata\" text,\n \"callsign\" text,\n \"commenced_operations\" real,\n \"fleet_size\" real,\n \"headquarters\" text\n);\n\nQuestion: Which ICAO has a Commenced operations larger than 2011?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"commercial_airlines\" WHERE \"commenced_operations\">2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"insects\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is the Status with an Author that is woodruff?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"insects\" WHERE \"authors\"='woodruff';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest Pick # when the CFL Team is the Toronto Argonauts?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_six\" WHERE \"cfl_team\"='toronto argonauts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the CFL Team with #48 as the pick number?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_six\" WHERE \"pick_num\"=48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the College with a Position of db, and the CFL Team was Winnipeg Blue Bombers?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_six\" WHERE \"position\"='db' AND \"cfl_team\"='winnipeg blue bombers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the CFL Team with Will Grant?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_six\" WHERE \"player\"='will grant';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ry_ky_an_missions_to_edo\" (\n \"year\" real,\n \"mission_type\" text,\n \"shogun\" text,\n \"ry_ky_an_king\" text,\n \"lead_envoy\" text,\n \"number_in_entourage\" text\n);\n\nQuestion: What is the latest year of a gratitude type mission with 99 in the entourage?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"ry_ky_an_missions_to_edo\" WHERE \"number_in_entourage\"='99' AND \"mission_type\"='gratitude';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ry_ky_an_missions_to_edo\" (\n \"year\" real,\n \"mission_type\" text,\n \"shogun\" text,\n \"ry_ky_an_king\" text,\n \"lead_envoy\" text,\n \"number_in_entourage\" text\n);\n\nQuestion: Who was the lead envoy of the mission with the Ry\u016bky\u016ban King sh\u014d eki?"
},
{
"role": "assistant",
"content": "SELECT \"lead_envoy\" FROM \"ry_ky_an_missions_to_edo\" WHERE \"ry_ky_an_king\"='sh\u014d eki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ry_ky_an_missions_to_edo\" (\n \"year\" real,\n \"mission_type\" text,\n \"shogun\" text,\n \"ry_ky_an_king\" text,\n \"lead_envoy\" text,\n \"number_in_entourage\" text\n);\n\nQuestion: Who was the lead envoy of the congratulation mission in 1718 with the Ry\u016bky\u016ban King sh\u014d kei?"
},
{
"role": "assistant",
"content": "SELECT \"lead_envoy\" FROM \"ry_ky_an_missions_to_edo\" WHERE \"ry_ky_an_king\"='sh\u014d kei' AND \"mission_type\"='congratulation' AND \"year\"=1718;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ry_ky_an_missions_to_edo\" (\n \"year\" real,\n \"mission_type\" text,\n \"shogun\" text,\n \"ry_ky_an_king\" text,\n \"lead_envoy\" text,\n \"number_in_entourage\" text\n);\n\nQuestion: Who was the lead envoy with the Ry\u016bky\u016ban King sh\u014d k\u014d?"
},
{
"role": "assistant",
"content": "SELECT \"lead_envoy\" FROM \"ry_ky_an_missions_to_edo\" WHERE \"ry_ky_an_king\"='sh\u014d k\u014d';"
}
] |
[
{
"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 \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: On 10/20/1979*, who was the Opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='10/20/1979*';"
}
] |
[
{
"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 \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average Attendance at a game with a Result of w 30-23?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"result\"='w 30-23';"
}
] |
[
{
"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 \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest Attendance at a game with the Result of w 25-17?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"result\"='w 25-17';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.