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 \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which venue has an Away team score of 18.9 (117)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"away_team_score\"='18.9 (117)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date has a Home team score of 7.11 (53)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_18\" WHERE \"home_team_score\"='7.11 (53)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is moorabbin oval's away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home score with an Away team score of 10.14 (74)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"away_team_score\"='10.14 (74)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is Karl Wendlinger's total grid #?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='karl wendlinger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team score also had a home team score of 20.20 (140)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_19\" WHERE \"home_team_score\"='20.20 (140)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team score had a Home team of Fitzroy?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_19\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_representatives_who_resigned\" (\n \"name\" text,\n \"party\" text,\n \"date_of_resignation\" text,\n \"replacement\" text,\n \"notes\" text\n);\n\nQuestion: Who was replaced by Lieve Wierinck?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_representatives_who_resigned\" WHERE \"replacement\"='lieve wierinck';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_rmsp_company_vessels\" (\n \"ship\" text,\n \"date_commissioned\" real,\n \"gross_tonnage\" real,\n \"propulsion\" text,\n \"material\" text\n);\n\nQuestion: Name the sum of gross tonnage for wood on date more tahn 1846 for comissioned and ship of esk"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gross_tonnage\") FROM \"list_of_rmsp_company_vessels\" WHERE \"material\"='wood' AND \"date_commissioned\">1846 AND \"ship\"='esk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_rmsp_company_vessels\" (\n \"ship\" text,\n \"date_commissioned\" real,\n \"gross_tonnage\" real,\n \"propulsion\" text,\n \"material\" text\n);\n\nQuestion: Tell me the sum of Gross Tonnage for isis ship on date commisioned less than 1842"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gross_tonnage\") FROM \"list_of_rmsp_company_vessels\" WHERE \"ship\"='isis' AND \"date_commissioned\"<1842;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_rmsp_company_vessels\" (\n \"ship\" text,\n \"date_commissioned\" real,\n \"gross_tonnage\" real,\n \"propulsion\" text,\n \"material\" text\n);\n\nQuestion: Tell me the lowest date commissioned for iron rmsrhone and gross tonnage less than 2,738"
},
{
"role": "assistant",
"content": "SELECT MIN(\"date_commissioned\") FROM \"list_of_rmsp_company_vessels\" WHERE \"material\"='iron' AND \"ship\"='rmsrhone' AND \"gross_tonnage\"<'2,738';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_tournament\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Name the height for 2008 club of trentino volley"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"men_s_tournament\" WHERE \"2008_club\"='trentino volley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_tournament\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Who was in the 2008 club of gabeca montichiari?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"men_s_tournament\" WHERE \"2008_club\"='gabeca montichiari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What Constructor has a +1.027 Time/Retired?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='+1.027';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What Constructor has 56 Laps?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\"=56;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What Driver has 28 Laps and a Grid greater than 5?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\">5 AND \"laps\"=28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest Laps with a Time/Retired Wheel?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"time_retired\"='wheel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What Driver has a +1.027 Time/Retired?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='+1.027';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What game has a score of 44-20?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"challenge_cup\" WHERE \"score\"='44-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What date was a game played at Headingley Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"challenge_cup\" WHERE \"venue\"='headingley stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What competition was played at Shay Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"challenge_cup\" WHERE \"venue\"='shay stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"show\" text,\n \"season\" real,\n \"episode_title\" text,\n \"episode\" real\n);\n\nQuestion: Which show had a part 3 before 2011?"
},
{
"role": "assistant",
"content": "SELECT \"show\" FROM \"filmography\" WHERE \"year\"<2011 AND \"episode_title\"='part 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"residents_of_white_deer_park\" (\n \"animal_name\" text,\n \"species\" text,\n \"books\" text,\n \"tv_series\" text,\n \"gender\" text,\n \"tv_seasons\" text,\n \"mate\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: What are the male Bounder books?"
},
{
"role": "assistant",
"content": "SELECT \"books\" FROM \"residents_of_white_deer_park\" WHERE \"gender\"='male' AND \"animal_name\"='bounder';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many people attended on April 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='april 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1905_1911\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text\n);\n\nQuestion: On what date were 5 built with 4-4-2t wheels?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1905_1911\" WHERE \"no_built\"=5 AND \"wheels\"='4-4-2t';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1905_1911\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text\n);\n\nQuestion: On what date was the number of locomotives 421-6?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1905_1911\" WHERE \"loco_nos\"='421-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1905_1911\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text\n);\n\nQuestion: How many were built with a locomotive number of 11-20?"
},
{
"role": "assistant",
"content": "SELECT \"no_built\" FROM \"1905_1911\" WHERE \"loco_nos\"='11-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1905_1911\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text\n);\n\nQuestion: On what date were more than 5 built with 4-4-2 wheels?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1905_1911\" WHERE \"wheels\"='4-4-2' AND \"no_built\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1905_1911\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text\n);\n\nQuestion: On what date were less than 10 built with a locomotive number of 31-35?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1905_1911\" WHERE \"no_built\"<10 AND \"loco_nos\"='31-35';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many spectators watched when the away team was Collingwood?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_10\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did Essendon score when they were the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"away_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did the home team score 19.17 (131)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"home_team_score\"='19.17 (131)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team at Brunswick Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"venue\"='brunswick street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was South Melbourne's away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at Brunswick Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"venue\"='brunswick street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: Tell me the lowest height for class of hewitt and prom less than 148"
},
{
"role": "assistant",
"content": "SELECT MIN(\"height_m\") FROM \"the\" WHERE \"class\"='hewitt' AND \"prom_m\"<148;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: Tell me the total number of prom for height less than 615"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"prom_m\") FROM \"the\" WHERE \"height_m\"<615;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: I want to know the peak which is prom less than 147 and height less than 619"
},
{
"role": "assistant",
"content": "SELECT \"peak\" FROM \"the\" WHERE \"prom_m\"<147 AND \"height_m\"<619;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: Tell me the peak for prom being less than 147"
},
{
"role": "assistant",
"content": "SELECT \"peak\" FROM \"the\" WHERE \"prom_m\"<147;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: Tell me the lowest prom for class of hewitt and peak of cushat law and height more than 615"
},
{
"role": "assistant",
"content": "SELECT MIN(\"prom_m\") FROM \"the\" WHERE \"class\"='hewitt' AND \"peak\"='cushat law' AND \"height_m\">615;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the\" (\n \"peak\" text,\n \"height_m\" real,\n \"prom_m\" real,\n \"class\" text,\n \"parent\" text\n);\n\nQuestion: Name the peak for height more than 619 and class of hewitt with prom being 148"
},
{
"role": "assistant",
"content": "SELECT \"peak\" FROM \"the\" WHERE \"height_m\">619 AND \"class\"='hewitt' AND \"prom_m\"=148;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partisan_mix_of_the_house_by_state\" (\n \"state_ranked_in_partisan_order\" text,\n \"percentage_democrats\" text,\n \"percentage_republicans\" text,\n \"democratic_republican\" text,\n \"democratic_seat_plurality\" text\n);\n\nQuestion: What is the percentage democrats with 2/4 democrat/republican?"
},
{
"role": "assistant",
"content": "SELECT \"percentage_democrats\" FROM \"partisan_mix_of_the_house_by_state\" WHERE \"democratic_republican\"='2/4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partisan_mix_of_the_house_by_state\" (\n \"state_ranked_in_partisan_order\" text,\n \"percentage_democrats\" text,\n \"percentage_republicans\" text,\n \"democratic_republican\" text,\n \"democratic_seat_plurality\" text\n);\n\nQuestion: What is the percentage democrats with democratic plurality of -3, and 2/5 democrat/republican?"
},
{
"role": "assistant",
"content": "SELECT \"percentage_democrats\" FROM \"partisan_mix_of_the_house_by_state\" WHERE \"democratic_seat_plurality\"='-3' AND \"democratic_republican\"='2/5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partisan_mix_of_the_house_by_state\" (\n \"state_ranked_in_partisan_order\" text,\n \"percentage_democrats\" text,\n \"percentage_republicans\" text,\n \"democratic_republican\" text,\n \"democratic_seat_plurality\" text\n);\n\nQuestion: What is the percent of republicans with 7/6 democrat/republican?"
},
{
"role": "assistant",
"content": "SELECT \"percentage_republicans\" FROM \"partisan_mix_of_the_house_by_state\" WHERE \"democratic_republican\"='7/6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partisan_mix_of_the_house_by_state\" (\n \"state_ranked_in_partisan_order\" text,\n \"percentage_democrats\" text,\n \"percentage_republicans\" text,\n \"democratic_republican\" text,\n \"democratic_seat_plurality\" text\n);\n\nQuestion: What is the democratic seat plurality with 29% democrat?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_seat_plurality\" FROM \"partisan_mix_of_the_house_by_state\" WHERE \"percentage_democrats\"='29%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partisan_mix_of_the_house_by_state\" (\n \"state_ranked_in_partisan_order\" text,\n \"percentage_democrats\" text,\n \"percentage_republicans\" text,\n \"democratic_republican\" text,\n \"democratic_seat_plurality\" text\n);\n\nQuestion: What is the democratic seat plurality with partisan order of New Hampshire?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_seat_plurality\" FROM \"partisan_mix_of_the_house_by_state\" WHERE \"state_ranked_in_partisan_order\"='new hampshire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score of the game with Pacers as the Visitor?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"december\" WHERE \"visitor\"='pacers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was Home on December 5, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"december\" WHERE \"date\"='december 5, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administered_by_the_national_government_\" (\n \"english_name\" text,\n \"japanese_orthography\" text,\n \"pronouciation\" text,\n \"abbreviation\" text,\n \"provider_national_government\" text,\n \"foundation\" real\n);\n\nQuestion: What is the Japanese orthography for the abbreviation of ndmc?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_orthography\" FROM \"administered_by_the_national_government_\" WHERE \"abbreviation\"='ndmc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administered_by_the_national_government_\" (\n \"english_name\" text,\n \"japanese_orthography\" text,\n \"pronouciation\" text,\n \"abbreviation\" text,\n \"provider_national_government\" text,\n \"foundation\" real\n);\n\nQuestion: What is the english name of the ministry of defense with an abbreviation of nda b\u014dei-dai(\u9632\u885b\u5927)?"
},
{
"role": "assistant",
"content": "SELECT \"english_name\" FROM \"administered_by_the_national_government_\" WHERE \"provider_national_government\"='ministry of defense' AND \"abbreviation\"='nda b\u014dei-dai(\u9632\u885b\u5927)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the team score when playing at home in victoria park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the top crowd when the away team scored 11.14 (80)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_16\" WHERE \"away_team_score\"='11.14 (80)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did st kilda score at home?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the top crowd when collingwood played home?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_16\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which team plays home in western oval venue?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the driver is innes ireland and they drove under 53 laps, what was the Time/Retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"<53 AND \"driver\"='innes ireland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps does peter arundell have?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race\" WHERE \"driver\"='peter arundell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver has a grid value larger than 11, and drove more than 52 laps?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\">11 AND \"laps\">52;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Tell me the away team score with the crowd bigger than 15,242 with home team of carlton"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"crowd\">'15,242' AND \"home_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the crowd for away team of north melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_1\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date when the away team is essendon?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_1\" WHERE \"away_team\"='essendon';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the visitor from vancouver on february 24"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"february\" WHERE \"home\"='vancouver' AND \"date\"='february 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: Which description is dated 1962?"
},
{
"role": "assistant",
"content": "SELECT \"description\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"='1962';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Moorabbin oval is home to what team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team scored 10.14 (74)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"away_team_score\"='10.14 (74)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many crowds had a home team score of 9.13 (67)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_11\" WHERE \"home_team_score\"='9.13 (67)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the crowd on the day the home team scored 7.10 (52)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_11\" WHERE \"home_team_score\"='7.10 (52)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" text,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: Who was the leader at the summit for the race in 2005?"
},
{
"role": "assistant",
"content": "SELECT \"leader_at_the_summit\" FROM \"appearances_in_tour_de_france\" WHERE \"year\"=2005;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" text,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: What is the sum of the stages for category 1 races after the year 2003?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"stage\") FROM \"appearances_in_tour_de_france\" WHERE \"category\"='1' AND \"year\">2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the stadium of melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_6\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the average crowd when the opposing team scored 19.16 (130)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_6\" WHERE \"away_team_score\"='19.16 (130)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record in the game where the decision was Backstrom and there were more than 18,568 in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"decision\"='backstrom' AND \"attendance\">'18,568';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zamora_trophy\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: For Getafe CF, what is the highest number of goals scored?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"zamora_trophy\" WHERE \"team\"='getafe cf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zamora_trophy\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: For players with fewer than 41 goals for CA Osasuna and averages under 1.06, what is the average number of matches?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"matches\") FROM \"zamora_trophy\" WHERE \"goals\"<41 AND \"team\"='ca osasuna' AND \"average\"<1.06;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zamora_trophy\" (\n \"goalkeeper\" text,\n \"goals\" real,\n \"matches\" real,\n \"average\" real,\n \"team\" text\n);\n\nQuestion: For averages of 1.58 and matches under 38, what is the average number of goals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals\") FROM \"zamora_trophy\" WHERE \"average\"=1.58 AND \"matches\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"uefa_season\" text,\n \"coeff\" text,\n \"ranking\" real,\n \"champions\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"cup_winner\" text,\n \"cup_runner_up\" text\n);\n\nQuestion: Which Ranking has a Season of 2009?"
},
{
"role": "assistant",
"content": "SELECT \"ranking\" FROM \"summary\" WHERE \"season\"='2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"uefa_season\" text,\n \"coeff\" text,\n \"ranking\" real,\n \"champions\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"cup_winner\" text,\n \"cup_runner_up\" text\n);\n\nQuestion: Which Champions have a Runner-up of tobol, and a Coeff of 1.125?"
},
{
"role": "assistant",
"content": "SELECT \"champions\" FROM \"summary\" WHERE \"runner_up\"='tobol' AND \"coeff\"='1.125';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"uefa_season\" text,\n \"coeff\" text,\n \"ranking\" real,\n \"champions\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"cup_winner\" text,\n \"cup_runner_up\" text\n);\n\nQuestion: In what Season is there a 3rd place of tobol, and a Champion of irtysh?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"summary\" WHERE \"3rd_place\"='tobol' AND \"champions\"='irtysh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"season\" text,\n \"uefa_season\" text,\n \"coeff\" text,\n \"ranking\" real,\n \"champions\" text,\n \"runner_up\" text,\n \"3rd_place\" text,\n \"cup_winner\" text,\n \"cup_runner_up\" text\n);\n\nQuestion: Which Champion has a Coeff of 1.000?"
},
{
"role": "assistant",
"content": "SELECT \"champions\" FROM \"summary\" WHERE \"coeff\"='1.000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_games\" (\n \"game\" real,\n \"date\" text,\n \"batting_1st\" text,\n \"batting_2nd\" text,\n \"result\" text\n);\n\nQuestion: what is the game for 23 april when batting 2nd is england 5/113 (19)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"qualifying_games\" WHERE \"date\"='23 april' AND \"batting_2nd\"='england 5/113 (19)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_games\" (\n \"game\" real,\n \"date\" text,\n \"batting_1st\" text,\n \"batting_2nd\" text,\n \"result\" text\n);\n\nQuestion: what is the game when batting 2nd is new zealand 6/133 (18)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"qualifying_games\" WHERE \"batting_2nd\"='new zealand 6/133 (18)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_games\" (\n \"game\" real,\n \"date\" text,\n \"batting_1st\" text,\n \"batting_2nd\" text,\n \"result\" text\n);\n\nQuestion: what is the game when the result is new zealand by 4 wickets?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"qualifying_games\" WHERE \"result\"='new zealand by 4 wickets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_games\" (\n \"game\" real,\n \"date\" text,\n \"batting_1st\" text,\n \"batting_2nd\" text,\n \"result\" text\n);\n\nQuestion: who is batting 1st in game 8?"
},
{
"role": "assistant",
"content": "SELECT \"batting_1st\" FROM \"qualifying_games\" WHERE \"game\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"pyramid_level\" text,\n \"regular_season_1\" text,\n \"playoffs_1\" text,\n \"regular_season_2\" text,\n \"playoffs_2\" text,\n \"copa_m_xico\" text,\n \"concacaf\" text\n);\n\nQuestion: What is the regular season 1 result of the season when the Copa M\u00e9xico was no longer played, the pyramid level was 2, and the regular season 2 result was 15th?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_1\" FROM \"year_by_year\" WHERE \"copa_m_xico\"='no longer played' AND \"pyramid_level\"='2' AND \"regular_season_2\"='15th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"pyramid_level\" text,\n \"regular_season_1\" text,\n \"playoffs_1\" text,\n \"regular_season_2\" text,\n \"playoffs_2\" text,\n \"copa_m_xico\" text,\n \"concacaf\" text\n);\n\nQuestion: What is the regular season 2 result of season 2001-02?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_2\" FROM \"year_by_year\" WHERE \"season\"='2001-02';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"pyramid_level\" text,\n \"regular_season_1\" text,\n \"playoffs_1\" text,\n \"regular_season_2\" text,\n \"playoffs_2\" text,\n \"copa_m_xico\" text,\n \"concacaf\" text\n);\n\nQuestion: What is the playoffs 2 result of season 2010-11?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs_2\" FROM \"year_by_year\" WHERE \"season\"='2010-11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"season\" text,\n \"pyramid_level\" text,\n \"regular_season_1\" text,\n \"playoffs_1\" text,\n \"regular_season_2\" text,\n \"playoffs_2\" text,\n \"copa_m_xico\" text,\n \"concacaf\" text\n);\n\nQuestion: What is the playoffs 1 result of season 2004-05?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs_1\" FROM \"year_by_year\" WHERE \"season\"='2004-05';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid did Alain Prost drive on?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"driver\"='alain prost';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was Riccardo Patrese's time/retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='riccardo patrese';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue has a score of 14.15 (99) for away teams?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_15\" WHERE \"away_team_score\"='14.15 (99)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue has the score of 14.11 (95) for away teams?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_15\" WHERE \"away_team_score\"='14.11 (95)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: How many rounds did geoff lees drive with chassis of n180?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='n180' AND \"driver\"='geoff lees';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the tyres for Didier pironi?"
},
{
"role": "assistant",
"content": "SELECT \"tyres\" FROM \"drivers_and_constructors\" WHERE \"driver\"='didier pironi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who was the constructor of the car that Jan Lammers made 7-14 rounds in?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"driver\"='jan lammers' AND \"rounds\"='7-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What engine was used during the race driven by Jan Lammers using a chassis of d3 d4, making a tyre of g and rounds of 4-6?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"tyres\"='g' AND \"chassis\"='d3 d4' AND \"driver\"='jan lammers' AND \"rounds\"='4-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Competition has a Venue of Seoul, and Result of 4-1?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='seoul' AND \"result\"='4-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What's the Result listed that has a Date of June 12, 1997?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='june 12, 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What's the Score listed that has a Result of 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What's the Result for the Competition of 1994 FIFA World Cup Qualification, with the Date of May 15, 1993?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"competition\"='1994 fifa world cup qualification' AND \"date\"='may 15, 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Competition had a Result of 3-0 and VEnue of Suwon?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"result\"='3-0' AND \"venue\"='suwon';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.