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 \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want the driver for Laps more than 8 and ferrari with Grid of 8"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\">8 AND \"constructor\"='ferrari' AND \"grid\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Which title has the Translation of vesoul?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"translation\"='vesoul';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" text,\n \"winner_and_nominees\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What was the orignal title for the winner and nominee, Breaking the Waves, in 1996 (11th)?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"1990s\" WHERE \"year\"='1996 (11th)' AND \"winner_and_nominees\"='breaking the waves';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" text,\n \"winner_and_nominees\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What is the original title for the winner and nominees 'Secrets & Lies'?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"1990s\" WHERE \"winner_and_nominees\"='secrets & lies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" text,\n \"winner_and_nominees\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: The winner and nominee 'Hidden Agenda' is from which country?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"1990s\" WHERE \"winner_and_nominees\"='hidden agenda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_electric\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What is the total amount of freight produced of u28c?"
},
{
"role": "assistant",
"content": "SELECT \"total_produced\" FROM \"general_electric\" WHERE \"service\"='freight' AND \"builder_s_model\"='u28c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_electric\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What is the build date for PRR Class gf30a?"
},
{
"role": "assistant",
"content": "SELECT \"build_date\" FROM \"general_electric\" WHERE \"prr_class\"='gf30a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_electric\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What is the PRR class for wheel arrangement c-c and total less than 15?"
},
{
"role": "assistant",
"content": "SELECT \"prr_class\" FROM \"general_electric\" WHERE \"wheel_arrangement\"='c-c' AND \"total_produced\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_electric\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What was the model for PRR class of gf28a freight?"
},
{
"role": "assistant",
"content": "SELECT \"builder_s_model\" FROM \"general_electric\" WHERE \"service\"='freight' AND \"prr_class\"='gf28a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1961\" (\n \"1961_democratic_primary\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"richmond_staten_is\" text,\n \"total\" real\n);\n\nQuestion: Who got 189,524 votes?"
},
{
"role": "assistant",
"content": "SELECT \"queens\" FROM \"1961\" WHERE \"manhattan\"='189,524';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Which owner has the frequency of 103.3 FM?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"fm\" WHERE \"frequency\"='103.3 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the call sign of the Classic Country Music station?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"fm\" WHERE \"format\"='classic country';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Which owner has the call sign of KDSU?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"fm\" WHERE \"call_sign\"='kdsu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the call sign for Thunder 106.1?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"fm\" WHERE \"name\"='thunder 106.1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"name\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Which owner has a Contemporary Christian music station on 97.9 FM?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"fm\" WHERE \"format\"='contemporary christian music' AND \"frequency\"='97.9 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\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 the leading scorer in the game where the visiting team was the Pistons?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"january\" WHERE \"visitor\"='pistons';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\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: How many people attended the game where the leading scorer was Tim Duncan (24), and the home team was the Spurs?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"january\" WHERE \"leading_scorer\"='tim duncan (24)' AND \"home\"='spurs';"
}
] |
[
{
"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 mean number of laps where Time/retired was a water leak and the grid number was bigger than 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"time_retired\"='water leak' AND \"grid\">12;"
}
] |
[
{
"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 mean number of laps when time/retired was spun off and the driver was Nick Heidfeld?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"time_retired\"='spun off' AND \"driver\"='nick heidfeld';"
}
] |
[
{
"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 sum grid number when the driver was Luciano Burti?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='luciano burti';"
}
] |
[
{
"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 constructor had a laps number bigger than 3 when the driver was Jarno Trulli?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\">3 AND \"driver\"='jarno trulli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"marginal_ordinary_income_tax_rate\" text,\n \"single\" text,\n \"married_filing_jointly_or_qualified_widow_er\" text,\n \"married_filing_separately\" text,\n \"head_of_household\" text\n);\n\nQuestion: Name the head of household for married filing jointly or qualified widow(er) being $137,051\u2013$208,850"
},
{
"role": "assistant",
"content": "SELECT \"head_of_household\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"married_filing_jointly_or_qualified_widow_er\"='$137,051\u2013$208,850';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"marginal_ordinary_income_tax_rate\" text,\n \"single\" text,\n \"married_filing_jointly_or_qualified_widow_er\" text,\n \"married_filing_separately\" text,\n \"head_of_household\" text\n);\n\nQuestion: Name the married filing jointly or qualified widow(er) with head of household being $117,451\u2013$190,200"
},
{
"role": "assistant",
"content": "SELECT \"married_filing_jointly_or_qualified_widow_er\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"head_of_household\"='$117,451\u2013$190,200';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"marginal_ordinary_income_tax_rate\" text,\n \"single\" text,\n \"married_filing_jointly_or_qualified_widow_er\" text,\n \"married_filing_separately\" text,\n \"head_of_household\" text\n);\n\nQuestion: Name the married filing separately for single of $0\u2013$8,350"
},
{
"role": "assistant",
"content": "SELECT \"married_filing_separately\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"single\"='$0\u2013$8,350';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"marginal_ordinary_income_tax_rate\" text,\n \"single\" text,\n \"married_filing_jointly_or_qualified_widow_er\" text,\n \"married_filing_separately\" text,\n \"head_of_household\" text\n);\n\nQuestion: Name the head of household that has married filing separately of $104,426\u2013$186,475"
},
{
"role": "assistant",
"content": "SELECT \"head_of_household\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"married_filing_separately\"='$104,426\u2013$186,475';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_and_capital_gains_tax_rates_for_\" (\n \"marginal_ordinary_income_tax_rate\" text,\n \"single\" text,\n \"married_filing_jointly_or_qualified_widow_er\" text,\n \"married_filing_separately\" text,\n \"head_of_household\" text\n);\n\nQuestion: Name the marginal ordinary income tax rate that has a head of household of $372,951+"
},
{
"role": "assistant",
"content": "SELECT \"marginal_ordinary_income_tax_rate\" FROM \"regular_and_capital_gains_tax_rates_for_\" WHERE \"head_of_household\"='$372,951+';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"40_point_games\" (\n \"number\" real,\n \"opponent\" text,\n \"box_score\" text,\n \"points\" real,\n \"fgm_fga\" text,\n \"3_pm_3_pa\" text,\n \"ftm_fta\" text,\n \"assists\" real,\n \"rebounds\" real,\n \"steals\" real,\n \"blocks\" real\n);\n\nQuestion: What is the point average for the game that has FGM-FGA of 11-28 and a number smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"40_point_games\" WHERE \"fgm_fga\"='11-28' AND \"number\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the lowest number of floors recorded for buildings built by Dubai Marriott Harbour Hotel & Suites?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"floors\") FROM \"tallest_buildings\" WHERE \"name\"='dubai marriott harbour hotel & suites';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the name of the building housing more than 101 floors, that was built after 2006?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"tallest_buildings\" WHERE \"year\">2006 AND \"floors\">101;"
}
] |
[
{
"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: Which team played against the away team that scored 5.5 (35)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_15\" WHERE \"away_team_score\"='5.5 (35)';"
}
] |
[
{
"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 was the crowd size on 4 july 1981, and a Away team of essendon?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_15\" WHERE \"date\"='4 july 1981' AND \"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_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: When did essendon play away?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_15\" 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 \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"film_or_series\" text,\n \"result\" text\n);\n\nQuestion: Which category won the Sundance Film Festival award in 1998?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"result\"='won' AND \"year\"=1998 AND \"award\"='sundance film festival';"
}
] |
[
{
"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 \"film_or_series\" text,\n \"result\" text\n);\n\nQuestion: Which award category was the film series The Wire nominated for after 2005?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"result\"='nominated' AND \"film_or_series\"='the wire' AND \"year\">2005;"
}
] |
[
{
"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 \"film_or_series\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the nominee for Outstanding Supporting Actress in a Drama Series in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"category\"='outstanding supporting actress in a drama series' AND \"year\"=2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\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 the home team scored 11.13 (79), what away team were they playing?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"home_team_score\"='11.13 (79)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\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 st kilda played as the away team, what date was that?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" WHERE \"away_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_2\" (\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 crowd total on the day the home team scored 12.12 (84)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_2\" WHERE \"home_team_score\"='12.12 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\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: On what date did Fitzroy play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" 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 \"round_2\" (\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 did the home team score 12.12 (84)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" WHERE \"home_team_score\"='12.12 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\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 points did the away team score in the game that the home team scored 14.25 (109)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_2\" WHERE \"home_team_score\"='14.25 (109)';"
}
] |
[
{
"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 sum of crowds that saw hawthorn at home?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_18\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"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 away side scores 10.17 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"away_team_score\"='10.17 (77)';"
}
] |
[
{
"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: Who is the home side when the away side scores 10.17 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"away_team_score\"='10.17 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"block_a\" text,\n \"antonio_thomas\" text,\n \"hikaru_sato\" text,\n \"hiroshi_yamato\" text,\n \"kaz_hayashi\" text,\n \"minoru\" text,\n \"super_crazy\" text\n);\n\nQuestion: Name the antonio thomas for Hikaru Sato of tanaka (8:09)"
},
{
"role": "assistant",
"content": "SELECT \"antonio_thomas\" FROM \"2010\" WHERE \"hikaru_sato\"='tanaka (8:09)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"block_a\" text,\n \"antonio_thomas\" text,\n \"hikaru_sato\" text,\n \"hiroshi_yamato\" text,\n \"kaz_hayashi\" text,\n \"minoru\" text,\n \"super_crazy\" text\n);\n\nQuestion: Tell me the block A for antonio thomas of kondo (13:24)"
},
{
"role": "assistant",
"content": "SELECT \"block_a\" FROM \"2010\" WHERE \"antonio_thomas\"='kondo (13:24)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"block_a\" text,\n \"antonio_thomas\" text,\n \"hikaru_sato\" text,\n \"hiroshi_yamato\" text,\n \"kaz_hayashi\" text,\n \"minoru\" text,\n \"super_crazy\" text\n);\n\nQuestion: Name the minoru that has a hikaru sato of x and super crazy of yang (8:36)"
},
{
"role": "assistant",
"content": "SELECT \"minoru\" FROM \"2010\" WHERE \"hikaru_sato\"='x' AND \"super_crazy\"='yang (8:36)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Atlanta was a visitor on December 8, what was their record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"december\" WHERE \"visitor\"='atlanta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_statistics\" (\n \"team\" text,\n \"nation\" text,\n \"from\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Tell me the team which has matches of 13"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_statistics\" WHERE \"matches\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_statistics\" (\n \"team\" text,\n \"nation\" text,\n \"from\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Tell me the sum of win % for drawn being larger than 35"
},
{
"role": "assistant",
"content": "SELECT SUM(\"win_pct\") FROM \"managerial_statistics\" WHERE \"drawn\">35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_statistics\" (\n \"team\" text,\n \"nation\" text,\n \"from\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Name the most win % for 13 drawn"
},
{
"role": "assistant",
"content": "SELECT MAX(\"win_pct\") FROM \"managerial_statistics\" WHERE \"drawn\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_statistics\" (\n \"team\" text,\n \"nation\" text,\n \"from\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Name the sum of drawn for 30 october 2006 and win % more than 43.2"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"managerial_statistics\" WHERE \"from\"='30 october 2006' AND \"win_pct\">43.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_statistics\" (\n \"team\" text,\n \"nation\" text,\n \"from\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Name the win % average from 22 april 2000 for drawn more than 1"
},
{
"role": "assistant",
"content": "SELECT AVG(\"win_pct\") FROM \"managerial_statistics\" WHERE \"from\"='22 april 2000' AND \"drawn\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_statistics\" (\n \"team\" text,\n \"nation\" text,\n \"from\" text,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: Name the average lost for matches of 6"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"managerial_statistics\" WHERE \"matches\"=6;"
}
] |
[
{
"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 the time recorded for grid 18?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What catalogue has a track less than 16 and 2/3/56 recorded with a song titled Lawdy Miss Clawdy?"
},
{
"role": "assistant",
"content": "SELECT \"catalogue\" FROM \"disc_two\" WHERE \"track\"<16 AND \"recorded\"='2/3/56' AND \"song_title\"='lawdy miss clawdy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What is the highest track for the song Rip it Up?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"track\") FROM \"disc_two\" WHERE \"song_title\"='rip it up';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What is the sum of every track with a catalogue of EPA 4054 with a 2:05 length?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"track\") FROM \"disc_two\" WHERE \"catalogue\"='epa 4054' AND \"time\"='2:05';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What catalogue has a length of 2:10?"
},
{
"role": "assistant",
"content": "SELECT \"catalogue\" FROM \"disc_two\" WHERE \"time\"='2:10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: When was the release date of a track greater than 4, 1/12/57 recorded, and a length of 2:31?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"disc_two\" WHERE \"track\">4 AND \"recorded\"='1/12/57' AND \"time\"='2:31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: When was the cataglogue EPA 4054 released with a 1/12/57 recorded?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"disc_two\" WHERE \"catalogue\"='epa 4054' AND \"recorded\"='1/12/57';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Tell me the school with a height of 6-9"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2002_boys_team\" WHERE \"height\"='6-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which school did the player have a height of 6-4?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2002_boys_team\" WHERE \"height\"='6-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Tell me the college that paul davis went to"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2002_boys_team\" WHERE \"player\"='paul davis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Tell me the school that jason fraser went to"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2002_boys_team\" WHERE \"player\"='jason fraser';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result of the game with 68,436 attending?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='68,436';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1988_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the NBA Draft status of the person who went to college at LSU?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"1988_boys_team\" WHERE \"college\"='lsu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1988_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is Player Kenny Williams' Height?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"1988_boys_team\" WHERE \"player\"='kenny williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1988_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What School did Player Billy Owens attend?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"1988_boys_team\" WHERE \"player\"='billy owens';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1988_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What School did Player Alonzo Mourning attend?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"1988_boys_team\" WHERE \"player\"='alonzo mourning';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze's on average for nations with over 1 total, less than 2 golds, ranked 2nd?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medals_table\" WHERE \"total\">1 AND \"gold\"<2 AND \"rank\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silvers on average for nations with less than 3 total, ranked 6, and over 1 bronze?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medals_table\" WHERE \"total\"<3 AND \"rank\"=6 AND \"bronze\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the Cubs game when the Cubs had a record of 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='1-0';"
}
] |
[
{
"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: Who did the Cubs play when they had a record of 4-4?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='4-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aor_radio_stations\" (\n \"call_letters\" text,\n \"market\" text,\n \"frequency\" text,\n \"aor_years\" text,\n \"current_format\" text\n);\n\nQuestion: What is the frequency of WMAD?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"aor_radio_stations\" WHERE \"call_letters\"='wmad';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"ifop_11_12_08\" text,\n \"ifop_1_9_09\" text,\n \"ipsos_3_14_09\" text,\n \"csa_4_16_09\" text,\n \"opinion_way_4_17_09\" text,\n \"ifop_4_24_09\" text,\n \"ipsos_5_2_09\" text,\n \"ifop_5_11_09\" text,\n \"opinion_way_5_11_09\" text\n);\n\nQuestion: Name the lfop 5/11/09 with opinion way of 5/11/09 of 2% and lpsos 3/14/09 of 2%"
},
{
"role": "assistant",
"content": "SELECT \"ifop_5_11_09\" FROM \"polling\" WHERE \"opinion_way_5_11_09\"='2%' AND \"ipsos_3_14_09\"='2%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"ifop_11_12_08\" text,\n \"ifop_1_9_09\" text,\n \"ipsos_3_14_09\" text,\n \"csa_4_16_09\" text,\n \"opinion_way_4_17_09\" text,\n \"ifop_4_24_09\" text,\n \"ipsos_5_2_09\" text,\n \"ifop_5_11_09\" text,\n \"opinion_way_5_11_09\" text\n);\n\nQuestion: Name the lfop 4/24/09 for opinionway of 4/17/09 of 5% for party of left front"
},
{
"role": "assistant",
"content": "SELECT \"ifop_4_24_09\" FROM \"polling\" WHERE \"opinion_way_4_17_09\"='5%' AND \"party\"='left front';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"ifop_11_12_08\" text,\n \"ifop_1_9_09\" text,\n \"ipsos_3_14_09\" text,\n \"csa_4_16_09\" text,\n \"opinion_way_4_17_09\" text,\n \"ifop_4_24_09\" text,\n \"ipsos_5_2_09\" text,\n \"ifop_5_11_09\" text,\n \"opinion_way_5_11_09\" text\n);\n\nQuestion: Name the lfop for 5/11/09 with lfop 1/9/09 of 5%"
},
{
"role": "assistant",
"content": "SELECT \"ifop_5_11_09\" FROM \"polling\" WHERE \"ifop_1_9_09\"='5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"ifop_11_12_08\" text,\n \"ifop_1_9_09\" text,\n \"ipsos_3_14_09\" text,\n \"csa_4_16_09\" text,\n \"opinion_way_4_17_09\" text,\n \"ifop_4_24_09\" text,\n \"ipsos_5_2_09\" text,\n \"ifop_5_11_09\" text,\n \"opinion_way_5_11_09\" text\n);\n\nQuestion: Name the csa 4/16/09 for opinionway being 4/17/09 of 12%"
},
{
"role": "assistant",
"content": "SELECT \"csa_4_16_09\" FROM \"polling\" WHERE \"opinion_way_4_17_09\"='12%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"ifop_11_12_08\" text,\n \"ifop_1_9_09\" text,\n \"ipsos_3_14_09\" text,\n \"csa_4_16_09\" text,\n \"opinion_way_4_17_09\" text,\n \"ifop_4_24_09\" text,\n \"ipsos_5_2_09\" text,\n \"ifop_5_11_09\" text,\n \"opinion_way_5_11_09\" text\n);\n\nQuestion: Name the lpsos 3/14/09 for opinionway of 4/17/09 of 5% and lfof 11/12/08 of 7%"
},
{
"role": "assistant",
"content": "SELECT \"ipsos_3_14_09\" FROM \"polling\" WHERE \"ifop_11_12_08\"='7%' AND \"opinion_way_4_17_09\"='5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"ifop_11_12_08\" text,\n \"ifop_1_9_09\" text,\n \"ipsos_3_14_09\" text,\n \"csa_4_16_09\" text,\n \"opinion_way_4_17_09\" text,\n \"ifop_4_24_09\" text,\n \"ipsos_5_2_09\" text,\n \"ifop_5_11_09\" text,\n \"opinion_way_5_11_09\" text\n);\n\nQuestion: Name the 2004 results for npa"
},
{
"role": "assistant",
"content": "SELECT \"results_2004\" FROM \"polling\" WHERE \"party\"='npa';"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: What was the decision when Tampa Bay was the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"february\" WHERE \"visitor\"='tampa bay';"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: Which visitor visited on February 21?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"february\" WHERE \"date\"='february 21';"
}
] |
[
{
"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 \"date\" text\n);\n\nQuestion: Which team has an away score of 9.10 (64)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"away_team_score\"='9.10 (64)';"
}
] |
[
{
"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 \"date\" text\n);\n\nQuestion: What date is the Victoria Park venue?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_6\" 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_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What Home team has an away score of 6.6 (42)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"away_team_score\"='6.6 (42)';"
}
] |
[
{
"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 \"date\" text\n);\n\nQuestion: What home team has a score of 5.8 (38)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"home_team_score\"='5.8 (38)';"
}
] |
[
{
"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 \"date\" text\n);\n\nQuestion: What is the away team score of a Melbourne team that has a home team score of 12.7 (79)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"home_team_score\"='12.7 (79)' AND \"away_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 \"date\" text\n);\n\nQuestion: What Away team is from Fitzroy?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_6\" 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 \"march\" (\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 the home team that played the Lakers?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"march\" WHERE \"visitor\"='lakers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"total_receipts\" real,\n \"loans_received\" real,\n \"receipts_w_o_loans\" real,\n \"money_spent\" real,\n \"cash_on_hand\" real,\n \"total_debt\" text,\n \"cash_on_hand_minus_debt\" real\n);\n\nQuestion: What is the low money with 374,164$ of debt and receipts larger than 3,898,226 without loans?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"money_spent\") FROM \"democrats\" WHERE \"total_debt\"='374,164' AND \"receipts_w_o_loans\">'3,898,226';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which tournament had a 2008 result of 1R?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='a' AND \"2008\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which tournament in 2012 had a 2007 and 2011 finishes of \"A\"?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='a' AND \"2011\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which tournament in 2013 had a 2010 finish of 1R?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='a' AND \"2010\"='1r';"
}
] |
[
{
"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: Which home team score has an Away team of melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_15\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"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 is the highest crowd for Home team of geelong?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_15\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"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: Which crowd has an Away team score of 16.9 (105)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_15\" WHERE \"away_team_score\"='16.9 (105)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_zealand_track_field_championships\" (\n \"year\" real,\n \"place\" text,\n \"event\" text,\n \"performance\" text,\n \"age_years\" real\n);\n\nQuestion: What is the year when the performance is 60.73m and the age (years) is more than 45?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"new_zealand_track_field_championships\" WHERE \"performance\"='60.73m' AND \"age_years\">45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_zealand_track_field_championships\" (\n \"year\" real,\n \"place\" text,\n \"event\" text,\n \"performance\" text,\n \"age_years\" real\n);\n\nQuestion: What is the highest age (years) that the 1st place had a performance of 62.20m?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"age_years\") FROM \"new_zealand_track_field_championships\" WHERE \"place\"='1st' AND \"performance\"='62.20m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_zealand_track_field_championships\" (\n \"year\" real,\n \"place\" text,\n \"event\" text,\n \"performance\" text,\n \"age_years\" real\n);\n\nQuestion: What is the place when the performance is 60.73m?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"new_zealand_track_field_championships\" WHERE \"performance\"='60.73m';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.