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_19\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Who was the away team during the game when the home team was the new zealand breakers?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_19\" WHERE \"home_team\"='new zealand breakers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the score of the game which featured the gold coast blaze as the away team and the adelaide 36ers as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_19\" WHERE \"away_team\"='gold coast blaze' AND \"home_team\"='adelaide 36ers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the average market value in billions of the company with less than 1,705.35 billions in assets, sales of 175.05 billions, and is ranked less than 19?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"market_value_billion\") FROM \"2007_list\" WHERE \"assets_billion\"<'1,705.35' AND \"sales_billion\"=175.05 AND \"rank\"<19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the total rank of the company with less than 248.44 billion in assets, an industry of oil and gas, headquarters in France, and a market value greater than 152.62 billions?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"2007_list\" WHERE \"assets_billion\"<248.44 AND \"industry\"='oil and gas' AND \"headquarters\"='france' AND \"market_value_billion\">152.62;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What company has more than 195.34 billion in sales, ranked greater than 7, more than 11.29 billion in profits, and a market value greater than 198.14 billion?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"2007_list\" WHERE \"sales_billion\">195.34 AND \"rank\">7 AND \"profits_billion\">11.29 AND \"market_value_billion\">198.14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the average rank of the company with more than 146.56 billion in sales and profits of 11.68 billions?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"2007_list\" WHERE \"sales_billion\">146.56 AND \"profits_billion\"=11.68;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the position of the player from the college of Nevada with a round over 5?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\">5 AND \"college\"='nevada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college had a pick in a round under 7, with a pick number 13 and overall was under 186?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"round\"<7 AND \"overall\"<186 AND \"pick\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_pastoral_regions\" (\n \"pastoral_region\" text,\n \"episcopal_vicar\" text,\n \"parishes\" real,\n \"high_schools\" real,\n \"elementary_schools\" text,\n \"cemeteries\" real\n);\n\nQuestion: How many Parishes in Merrimack which has 4 Cemeteries?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"parishes\") FROM \"list_of_pastoral_regions\" WHERE \"pastoral_region\"='merrimack' AND \"cemeteries\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_pastoral_regions\" (\n \"pastoral_region\" text,\n \"episcopal_vicar\" text,\n \"parishes\" real,\n \"high_schools\" real,\n \"elementary_schools\" text,\n \"cemeteries\" real\n);\n\nQuestion: What Pastoral Region has 3 Cemeteries?"
},
{
"role": "assistant",
"content": "SELECT \"pastoral_region\" FROM \"list_of_pastoral_regions\" WHERE \"cemeteries\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_pastoral_regions\" (\n \"pastoral_region\" text,\n \"episcopal_vicar\" text,\n \"parishes\" real,\n \"high_schools\" real,\n \"elementary_schools\" text,\n \"cemeteries\" real\n);\n\nQuestion: How many High schools in the Region with 8 Cemeteries?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"high_schools\") FROM \"list_of_pastoral_regions\" WHERE \"cemeteries\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_pastoral_regions\" (\n \"pastoral_region\" text,\n \"episcopal_vicar\" text,\n \"parishes\" real,\n \"high_schools\" real,\n \"elementary_schools\" text,\n \"cemeteries\" real\n);\n\nQuestion: What Pastoral Region has Episcopal Vicar Robert Francis Hennessey?"
},
{
"role": "assistant",
"content": "SELECT \"pastoral_region\" FROM \"list_of_pastoral_regions\" WHERE \"episcopal_vicar\"='robert francis hennessey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"rank\" real,\n \"name\" text,\n \"period\" text,\n \"games\" real,\n \"goals\" text\n);\n\nQuestion: What is the name of the person with more than 299 games during the 1995\u201307 period?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"most_appearances\" WHERE \"games\">299 AND \"period\"='1995\u201307';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"rank\" real,\n \"name\" text,\n \"period\" text,\n \"games\" real,\n \"goals\" text\n);\n\nQuestion: What is the number of games for Shlomi Avrahami?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"most_appearances\" WHERE \"name\"='shlomi avrahami';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"rank\" real,\n \"name\" text,\n \"period\" text,\n \"games\" real,\n \"goals\" text\n);\n\nQuestion: What is the rank for the period of 1973\u201389, with less than 423 games."
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"most_appearances\" WHERE \"period\"='1973\u201389' AND \"games\"<423;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the team 1 when Ulisses is team 2?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"first_round\" WHERE \"team_2\"='ulisses';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"temperature_records\" (\n \"year\" text,\n \"2011\" text,\n \"2010\" text,\n \"2009\" text,\n \"2008\" text,\n \"2007\" text,\n \"2006\" text,\n \"2005\" text\n);\n\nQuestion: What is 2009, when Year is \"Highest Mean Annual Temperature\"?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"temperature_records\" WHERE \"year\"='highest mean annual temperature';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_sport\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold values have totals over 30, bronzes over 35, and are in Swimming?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"by_sport\" WHERE \"total\">30 AND \"sport\"='swimming' AND \"bronze\">35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_sport\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest bronze value with silvers over 2, golds under 16, and in Cycling?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"by_sport\" WHERE \"silver\">2 AND \"sport\"='cycling' AND \"gold\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_sport\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total associated with Bronzes over 35?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"by_sport\" WHERE \"bronze\">35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_sport\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest bronze value associated with golds over 0, silvers over 11, and totals of 36?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"by_sport\" WHERE \"gold\">0 AND \"total\"=36 AND \"silver\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_sport\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of golds in athletics associated with over 42 silvers?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"by_sport\" WHERE \"sport\"='athletics' AND \"silver\">42;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_sport\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest number of silvers associated with bronzes under 20, totals of 1, golds of 0, and in Water Polo?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"by_sport\" WHERE \"bronze\"<20 AND \"total\"=1 AND \"sport\"='water polo' AND \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the lowest pick number for Marc Pilon?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"round_one\" WHERE \"player\"='marc pilon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player was from the British Columbia college?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"college\"='british columbia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the highest pick number for the Hamilton tiger-cats?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_one\" WHERE \"cfl_team\"='hamilton tiger-cats';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the pick number for the WR position?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_one\" WHERE \"position\"='wr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Can you tell me the Goal that has the Result of 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"goal\" FROM \"international_goals\" WHERE \"result\"='2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_prizes\" (\n \"rank\" text,\n \"event\" text,\n \"place\" text,\n \"name\" text,\n \"prize\" text\n);\n\nQuestion: What is Place, when Prize is \"$381.030\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"top_10_prizes\" WHERE \"prize\"='$381.030';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_prizes\" (\n \"rank\" text,\n \"event\" text,\n \"place\" text,\n \"name\" text,\n \"prize\" text\n);\n\nQuestion: What is Rank, when Event is \"LAPT3 Punta Del Este\"?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"top_10_prizes\" WHERE \"event\"='lapt3 punta del este';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_prizes\" (\n \"rank\" text,\n \"event\" text,\n \"place\" text,\n \"name\" text,\n \"prize\" text\n);\n\nQuestion: What is Name, when Prize is \"$279.330\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"top_10_prizes\" WHERE \"prize\"='$279.330';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_prizes\" (\n \"rank\" text,\n \"event\" text,\n \"place\" text,\n \"name\" text,\n \"prize\" text\n);\n\nQuestion: What is Prize, when Rank is \"2nd\"?"
},
{
"role": "assistant",
"content": "SELECT \"prize\" FROM \"top_10_prizes\" WHERE \"rank\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_prizes\" (\n \"rank\" text,\n \"event\" text,\n \"place\" text,\n \"name\" text,\n \"prize\" text\n);\n\nQuestion: What is Rank, when Event is \"LAPT4 S\u00e3o Paulo\"?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"top_10_prizes\" WHERE \"event\"='lapt4 s\u00e3o paulo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_prizes\" (\n \"rank\" text,\n \"event\" text,\n \"place\" text,\n \"name\" text,\n \"prize\" text\n);\n\nQuestion: What is Prize, when Name is \"Valdemar Kwaysser\"?"
},
{
"role": "assistant",
"content": "SELECT \"prize\" FROM \"top_10_prizes\" WHERE \"name\"='valdemar kwaysser';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"fieldbus\" text,\n \"bus_power\" text,\n \"cabling_redundancy\" text,\n \"synchronisation\" text,\n \"sub_millisecond_cycle\" text\n);\n\nQuestion: What is the bus power for the Controlnet Fieldbus?"
},
{
"role": "assistant",
"content": "SELECT \"bus_power\" FROM \"features\" WHERE \"fieldbus\"='controlnet';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"fieldbus\" text,\n \"bus_power\" text,\n \"cabling_redundancy\" text,\n \"synchronisation\" text,\n \"sub_millisecond_cycle\" text\n);\n\nQuestion: What is the millisecond cycle for the Fieldbus?"
},
{
"role": "assistant",
"content": "SELECT \"sub_millisecond_cycle\" FROM \"features\" WHERE \"fieldbus\"='fieldbus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"features\" (\n \"fieldbus\" text,\n \"bus_power\" text,\n \"cabling_redundancy\" text,\n \"synchronisation\" text,\n \"sub_millisecond_cycle\" text\n);\n\nQuestion: What is the synchronisation for the controlnet fieldbus?"
},
{
"role": "assistant",
"content": "SELECT \"synchronisation\" FROM \"features\" WHERE \"fieldbus\"='controlnet';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a College of colorado?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"college\"='colorado';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which College has an Overall larger than 211, a Position of db, and a Name of carl charon?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"overall\">211 AND \"position\"='db' AND \"name\"='carl charon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall has a College of michigan state, a Position of fb, and a Round larger than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='michigan state' AND \"position\"='fb' AND \"round\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round has a College of arizona?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='arizona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall has a Round of 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round has a Pick larger than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"pick\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"locale\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: In italy, when the stolen ends were 10 and blank ends were under 14, what's the lowest ends won?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"ends_won\") FROM \"round_robin\" WHERE \"stolen_ends\"=10 AND \"locale\"='italy' AND \"blank_ends\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"locale\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" text\n);\n\nQuestion: When ends won were below 57 but stolen ends are more than 14, what's the highest blank ends found?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"blank_ends\") FROM \"round_robin\" WHERE \"stolen_ends\">14 AND \"ends_won\"<57;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"values\" (\n \"constellation\" text,\n \"largest_component_fractional_share\" real,\n \"other_components_fractional_shares\" text,\n \"n_laakso_taagepera\" real,\n \"n_golosov\" real\n);\n\nQuestion: What is the highest value for N, Golosov, when Constellation is G, and when Largest Component, Fractional Share is greater than 0.15?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"n_golosov\") FROM \"values\" WHERE \"constellation\"='g' AND \"largest_component_fractional_share\">0.15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"values\" (\n \"constellation\" text,\n \"largest_component_fractional_share\" real,\n \"other_components_fractional_shares\" text,\n \"n_laakso_taagepera\" real,\n \"n_golosov\" real\n);\n\nQuestion: What is the sum of the values for N, Laakso-Taagepera, when Largest Component, Fractional Share is 0.35000000000000003, and when Constellation is E?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"n_laakso_taagepera\") FROM \"values\" WHERE \"largest_component_fractional_share\"=0.35000000000000003 AND \"constellation\"='e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"values\" (\n \"constellation\" text,\n \"largest_component_fractional_share\" real,\n \"other_components_fractional_shares\" text,\n \"n_laakso_taagepera\" real,\n \"n_golosov\" real\n);\n\nQuestion: What is the sum of the values for Largest Component, Fractional Share, when Constellation is E, and when N, Golosov is greater than 2.9?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"largest_component_fractional_share\") FROM \"values\" WHERE \"constellation\"='e' AND \"n_golosov\">2.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"values\" (\n \"constellation\" text,\n \"largest_component_fractional_share\" real,\n \"other_components_fractional_shares\" text,\n \"n_laakso_taagepera\" real,\n \"n_golosov\" real\n);\n\nQuestion: What is the average Largest Component, Fractional Share, when N, Laakso-Taagepera is 1.98, and when N, Golosov is greater than 1.82?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"largest_component_fractional_share\") FROM \"values\" WHERE \"n_laakso_taagepera\"=1.98 AND \"n_golosov\">1.82;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"values\" (\n \"constellation\" text,\n \"largest_component_fractional_share\" real,\n \"other_components_fractional_shares\" text,\n \"n_laakso_taagepera\" real,\n \"n_golosov\" real\n);\n\nQuestion: What is the lowest value for N, Golosov, when N, Laakso-Taagepera is greater than 10.64?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"n_golosov\") FROM \"values\" WHERE \"n_laakso_taagepera\">10.64;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance record for Leicester City?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"third_round_proper\" WHERE \"home_team\"='leicester city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for Arsenal?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"third_round_proper\" WHERE \"home_team\"='arsenal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the home team against the Bolton Wanderers?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='bolton wanderers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Who was the opponent of the match in South Dakota, United States which has 2 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=2 AND \"location\"='south dakota, united states';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"branches_and_at_ms_of_scheduled_commerci\" (\n \"bank_type\" text,\n \"number_of_branches\" real,\n \"on_site_at_ms\" real,\n \"off_site_at_ms\" real,\n \"total_at_ms\" real\n);\n\nQuestion: What is the total ATMs with off-site ATMs greater than 3672, and less than 1685 as the number of branches?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_at_ms\") FROM \"branches_and_at_ms_of_scheduled_commerci\" WHERE \"off_site_at_ms\">3672 AND \"number_of_branches\"<1685;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"branches_and_at_ms_of_scheduled_commerci\" (\n \"bank_type\" text,\n \"number_of_branches\" real,\n \"on_site_at_ms\" real,\n \"off_site_at_ms\" real,\n \"total_at_ms\" real\n);\n\nQuestion: What is the total number of branches when the on-site ATMS is 1548, and the off-site ATMs is bigger than 3672?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"number_of_branches\") FROM \"branches_and_at_ms_of_scheduled_commerci\" WHERE \"on_site_at_ms\"=1548 AND \"off_site_at_ms\">3672;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"branches_and_at_ms_of_scheduled_commerci\" (\n \"bank_type\" text,\n \"number_of_branches\" real,\n \"on_site_at_ms\" real,\n \"off_site_at_ms\" real,\n \"total_at_ms\" real\n);\n\nQuestion: What is the minimum total ATMs with new private sector banks as the bank type, and the on-site ATMs are greater than 1883?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_at_ms\") FROM \"branches_and_at_ms_of_scheduled_commerci\" WHERE \"bank_type\"='new private sector banks' AND \"on_site_at_ms\">1883;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"branches_and_at_ms_of_scheduled_commerci\" (\n \"bank_type\" text,\n \"number_of_branches\" real,\n \"on_site_at_ms\" real,\n \"off_site_at_ms\" real,\n \"total_at_ms\" real\n);\n\nQuestion: What is the mean on-site ATMS that have off-site ATMs of 1567, and the total number of ATMs less than 4772?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"on_site_at_ms\") FROM \"branches_and_at_ms_of_scheduled_commerci\" WHERE \"off_site_at_ms\"=1567 AND \"total_at_ms\"<4772;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"branches_and_at_ms_of_scheduled_commerci\" (\n \"bank_type\" text,\n \"number_of_branches\" real,\n \"on_site_at_ms\" real,\n \"off_site_at_ms\" real,\n \"total_at_ms\" real\n);\n\nQuestion: With foreign banks as the bank type, and on-site ATMS less than 218, what is the average off-site ATMs?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"off_site_at_ms\") FROM \"branches_and_at_ms_of_scheduled_commerci\" WHERE \"bank_type\"='foreign banks' AND \"on_site_at_ms\"<218;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"enemy_aircraft_shot_down_or_disabled_by_\" (\n \"pilot\" text,\n \"date\" text,\n \"place\" text,\n \"weapon\" text,\n \"effect\" text\n);\n\nQuestion: What is Effect, when Weapon is \"35mm/Small arms fire\"?"
},
{
"role": "assistant",
"content": "SELECT \"effect\" FROM \"enemy_aircraft_shot_down_or_disabled_by_\" WHERE \"weapon\"='35mm/small arms fire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"enemy_aircraft_shot_down_or_disabled_by_\" (\n \"pilot\" text,\n \"date\" text,\n \"place\" text,\n \"weapon\" text,\n \"effect\" text\n);\n\nQuestion: What is Date, when Effect is \"Shot Down\", and when Place is \"South of Stanley Airport\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"enemy_aircraft_shot_down_or_disabled_by_\" WHERE \"effect\"='shot down' AND \"place\"='south of stanley airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"enemy_aircraft_shot_down_or_disabled_by_\" (\n \"pilot\" text,\n \"date\" text,\n \"place\" text,\n \"weapon\" text,\n \"effect\" text\n);\n\nQuestion: What is Place, when Weapon is \"35mm fire\", and when Date is \"27 May 1982\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"enemy_aircraft_shot_down_or_disabled_by_\" WHERE \"weapon\"='35mm fire' AND \"date\"='27 may 1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"enemy_aircraft_shot_down_or_disabled_by_\" (\n \"pilot\" text,\n \"date\" text,\n \"place\" text,\n \"weapon\" text,\n \"effect\" text\n);\n\nQuestion: What is Pilot, when Place is \"Goose Green\", and when Date is \"27 May 1982\"?"
},
{
"role": "assistant",
"content": "SELECT \"pilot\" FROM \"enemy_aircraft_shot_down_or_disabled_by_\" WHERE \"place\"='goose green' AND \"date\"='27 may 1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"enemy_aircraft_shot_down_or_disabled_by_\" (\n \"pilot\" text,\n \"date\" text,\n \"place\" text,\n \"weapon\" text,\n \"effect\" text\n);\n\nQuestion: What is Place, when Weapon is \"35mm/Small arms fire\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"enemy_aircraft_shot_down_or_disabled_by_\" WHERE \"weapon\"='35mm/small arms fire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"enemy_aircraft_shot_down_or_disabled_by_\" (\n \"pilot\" text,\n \"date\" text,\n \"place\" text,\n \"weapon\" text,\n \"effect\" text\n);\n\nQuestion: What is Pilot, when Weapon is \"35mm fire\", and when Date is \"4 May 1982\"?"
},
{
"role": "assistant",
"content": "SELECT \"pilot\" FROM \"enemy_aircraft_shot_down_or_disabled_by_\" WHERE \"weapon\"='35mm fire' AND \"date\"='4 may 1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Where is the player from that has a Jersey Number(s) greater than 0 in the year 2003?"
},
{
"role": "assistant",
"content": "SELECT \"from\" FROM \"o\" WHERE \"jersey_number_s\">0 AND \"years\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Who is the player with a Jersey Number(s) greater than 30?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"o\" WHERE \"jersey_number_s\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the Years of the player with Jersey Number(s) of 44?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"o\" WHERE \"jersey_number_s\"=44;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_korea_rok\" (\n \"city\" text,\n \"korean\" text,\n \"hanja\" text,\n \"province\" text,\n \"population_2010\" real\n);\n\nQuestion: What was the population in North Jeolla?"
},
{
"role": "assistant",
"content": "SELECT \"population_2010\" FROM \"south_korea_rok\" WHERE \"province\"='north jeolla';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_korea_rok\" (\n \"city\" text,\n \"korean\" text,\n \"hanja\" text,\n \"province\" text,\n \"population_2010\" real\n);\n\nQuestion: What's Korean for \u5357\u694a\u5dde Hanja?"
},
{
"role": "assistant",
"content": "SELECT \"korean\" FROM \"south_korea_rok\" WHERE \"hanja\"='\u5357\u694a\u5dde';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_korea_rok\" (\n \"city\" text,\n \"korean\" text,\n \"hanja\" text,\n \"province\" text,\n \"population_2010\" real\n);\n\nQuestion: What's the Korean word for Pohang?"
},
{
"role": "assistant",
"content": "SELECT \"korean\" FROM \"south_korea_rok\" WHERE \"city\"='pohang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What's the team nickname of the private/catholic school whose enrollment is larger than 3,490?"
},
{
"role": "assistant",
"content": "SELECT \"team_nickname\" FROM \"former_teams\" WHERE \"affiliation\"='private/catholic' AND \"enrollment\">'3,490';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What's the total enrollment of public schools located in Buffalo, New York that were founded after 1846?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"enrollment\") FROM \"former_teams\" WHERE \"location\"='buffalo, new york' AND \"affiliation\"='public' AND \"founded\">1846;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What year did Bangkok University and Chunnam Dragons have a score of 0-0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"season\") FROM \"results\" WHERE \"team_1\"='bangkok university' AND \"score\"='0-0' AND \"team_2\"='chunnam dragons';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer window for Christian Nerlinger?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"out\" WHERE \"name\"='christian nerlinger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name for the end of contract because they're moving to Falkirk?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"out\" WHERE \"type\"='end of contract' AND \"moving_to\"='falkirk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What type of transfer window is winter in Ita?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"out\" WHERE \"transfer_window\"='winter' AND \"nat\"='ita';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the type of loan and the transfer fee loan?"
},
{
"role": "assistant",
"content": "SELECT \"nat\" FROM \"out\" WHERE \"type\"='loan' AND \"transfer_fee\"='loan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: On what date did a streak start on November 14?"
},
{
"role": "assistant",
"content": "SELECT \"streak\" FROM \"season_schedule\" WHERE \"date\"='november 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of game 36?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=36;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cable_stayed_bridges_under_construction_\" (\n \"name\" text,\n \"location\" text,\n \"country\" text,\n \"longest_span\" text,\n \"pylons\" real\n);\n\nQuestion: Where was the third bridge over panama canal?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"cable_stayed_bridges_under_construction_\" WHERE \"name\"='third bridge over panama canal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"rating\" real,\n \"comp\" real,\n \"long\" real,\n \"yds_game\" real\n);\n\nQuestion: Name the Comp which has a Name of smith?"
},
{
"role": "assistant",
"content": "SELECT \"comp\" FROM \"passing\" WHERE \"name\"='smith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"rating\" real,\n \"comp\" real,\n \"long\" real,\n \"yds_game\" real\n);\n\nQuestion: Name the sum of Comp which has a Yds/game smaller than 209.5,brytus Name, and a Rating smaller than 100?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"comp\") FROM \"passing\" WHERE \"yds_game\"<209.5 AND \"name\"='brytus' AND \"rating\"<100;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"rating\" real,\n \"comp\" real,\n \"long\" real,\n \"yds_game\" real\n);\n\nQuestion: Name the highest Comp which has a Yds/game larger than 0, bostick, and a Rating smaller than 91.77?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"comp\") FROM \"passing\" WHERE \"yds_game\">0 AND \"name\"='bostick' AND \"rating\"<91.77;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Can you tell me the sum of Score that has the Place of t5, and the Country of united states, and the Player of jeff maggert?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"score\") FROM \"first_round\" WHERE \"place\"='t5' AND \"country\"='united states' AND \"player\"='jeff maggert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Which event had a decision method?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='decision';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Where was the method of tko?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_men\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What is the time of kenya, which is ranked 2?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"top_10_men\" WHERE \"nation\"='kenya' AND \"rank\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_men\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What race is on 26 June 2011?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"top_10_men\" WHERE \"date\"='26 june 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_10_men\" (\n \"rank\" text,\n \"time\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"race\" text\n);\n\nQuestion: What is the time of the peachtree road race in kenya?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"top_10_men\" WHERE \"nation\"='kenya' AND \"race\"='peachtree road race';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of team chicago?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record of team utah?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"team\"='utah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location and attendance of game 63?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"game\"=63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the person who played small forward?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"m\" WHERE \"position\"='small forward';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position did Rich Manning play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"m\" WHERE \"player\"='rich manning';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position did the player who was with the grizzlies from 2007-2009 play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"m\" WHERE \"years_for_grizzlies\"='2007-2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"draft\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: Who is the player in the 2008 draft with a pick greater than 5?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"selections\" WHERE \"draft\"=2008 AND \"pick\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"draft\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: What is the total pick number of the player from a round greater than 1, a draft before 2002, and with the college/high school/club of western kentucky?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"selections\" WHERE \"round\">1 AND \"draft\"<2002 AND \"college_high_school_club\"='western kentucky';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"draft\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: What is the lowest draft number with a 48 pick?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draft\") FROM \"selections\" WHERE \"pick\"=48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text,\n \"aafc_team\" text\n);\n\nQuestion: Which Name has a AAFC Team of los angeles dons, and a Position of fb, and a College of oklahoma a&m?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"washington_redskins_draft_history\" WHERE \"aafc_team\"='los angeles dons' AND \"position\"='fb' AND \"college\"='oklahoma a&m';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.