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 \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Country of the Player in Place 1?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"place\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place of the Player with a To par of \u201310 and a Score of 67-67-66=200?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"to_par\"='\u201310' AND \"score\"='67-67-66=200';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_points_in_a_la_liga_season_at_least\" (\n \"rank\" real,\n \"club\" text,\n \"season\" text,\n \"points\" real,\n \"apps\" real\n);\n\nQuestion: Can you tell me the total number of Rank that has the Points larger than 99, and the Club of barcelona?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"most_points_in_a_la_liga_season_at_least\" WHERE \"points\">99 AND \"club\"='barcelona';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: How many people on average attended when Eastwood Town was the away team, and the tie number was less than 8?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"replays\" WHERE \"tie_no\"<8 AND \"away_team\"='eastwood town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: The game with home team Crowborough Athletic, with an attendance less than 848 had what as the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"replays\" WHERE \"attendance\"<848 AND \"home_team\"='crowborough athletic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: The game with Bashley as the home team had what maximum attendance?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"replays\" WHERE \"home_team\"='bashley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the tie number total when Harlow Town is the away team?" }, { "role": "assistant", "content": "SELECT COUNT(\"tie_no\") FROM \"replays\" WHERE \"away_team\"='harlow town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Which artist has a draw greater than 15?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"results\" WHERE \"draw\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What was the highest place a song by Jacques Raymond reached, with a draw over 14?" }, { "role": "assistant", "content": "SELECT MAX(\"place\") FROM \"results\" WHERE \"artist\"='jacques raymond' AND \"draw\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"donald_campbell_s_unlimited_world_water_\" (\n \"speed\" text,\n \"craft\" text,\n \"pilot\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: What is the Craft used at Coniston Water?" }, { "role": "assistant", "content": "SELECT \"craft\" FROM \"donald_campbell_s_unlimited_world_water_\" WHERE \"location\"='coniston water';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"donald_campbell_s_unlimited_world_water_\" (\n \"speed\" text,\n \"craft\" text,\n \"pilot\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: What is the Speed at Lake Mead?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"donald_campbell_s_unlimited_world_water_\" WHERE \"location\"='lake mead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_ten_goalscorers_still_active_primera\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"current_club\" text,\n \"goals\" real,\n \"apps\" real,\n \"ratio\" real\n);\n\nQuestion: Which Goals have a Ratio of 0.29?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"top_ten_goalscorers_still_active_primera\" WHERE \"ratio\"=0.29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_ten_goalscorers_still_active_primera\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"current_club\" text,\n \"goals\" real,\n \"apps\" real,\n \"ratio\" real\n);\n\nQuestion: Which Goals have a Current Club of real madrid, and a Ratio smaller than 1.08, and a Rank smaller than 5?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"top_ten_goalscorers_still_active_primera\" WHERE \"current_club\"='real madrid' AND \"ratio\"<1.08 AND \"rank\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_ten_goalscorers_still_active_primera\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"current_club\" text,\n \"goals\" real,\n \"apps\" real,\n \"ratio\" real\n);\n\nQuestion: Which Current Club has a Rank of 4?" }, { "role": "assistant", "content": "SELECT \"current_club\" FROM \"top_ten_goalscorers_still_active_primera\" WHERE \"rank\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: What is the second party that has a conservative first party in the 1834 election?" }, { "role": "assistant", "content": "SELECT \"second_party\" FROM \"m_ps_1832_1885\" WHERE \"first_party\"='conservative' AND \"election\"='1834';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Who is the second member with first member Sir Rowland Hill, BT, and a conservative second party?" }, { "role": "assistant", "content": "SELECT \"second_member\" FROM \"m_ps_1832_1885\" WHERE \"first_member\"='sir rowland hill, bt' AND \"second_party\"='conservative';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: What is the first party with second member Hon. Rowland Hill, in the 1857 election?" }, { "role": "assistant", "content": "SELECT \"first_party\" FROM \"m_ps_1832_1885\" WHERE \"second_member\"='hon. rowland hill' AND \"election\"='1857';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Who is the second member that is a second party Whig in the 1834 election?" }, { "role": "assistant", "content": "SELECT \"second_member\" FROM \"m_ps_1832_1885\" WHERE \"second_party\"='whig' AND \"election\"='1834';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: What is the second party that has a conservative first party and second member John Cotes?" }, { "role": "assistant", "content": "SELECT \"second_party\" FROM \"m_ps_1832_1885\" WHERE \"first_party\"='conservative' AND \"second_member\"='john cotes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place is the player with a score of 69-68=137?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='69-68=137';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the score for the t10 player from zimbabwe?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t10' AND \"country\"='zimbabwe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the score of the t10 player from australia?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t10' AND \"country\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's bob tway's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='bob tway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Player has a Place of t10, a Country of united states, and a Score of 67-73=140?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='t10' AND \"country\"='united states' AND \"score\"='67-73=140';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Place has a Player of seve ballesteros?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='seve ballesteros';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Country has a Player of nick faldo?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='nick faldo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What To par has a Place of t10, and a Score of 67-73=140?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t10' AND \"score\"='67-73=140';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Score has a Place of t6, a Country of united states, and a Player of fred couples?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t6' AND \"country\"='united states' AND \"player\"='fred couples';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What To par has a Score of 68-66=134?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='68-66=134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_providers\" (\n \"provider\" text,\n \"years\" text,\n \"free_or_pay\" text,\n \"transmission\" text,\n \"on_demand\" text\n);\n\nQuestion: Name the Provider that has a pay in 2006\u2013, and a Transmission of iptv and digital terrestrial?" }, { "role": "assistant", "content": "SELECT \"provider\" FROM \"current_providers\" WHERE \"free_or_pay\"='pay' AND \"years\"='2006\u2013' AND \"transmission\"='iptv and digital terrestrial';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_providers\" (\n \"provider\" text,\n \"years\" text,\n \"free_or_pay\" text,\n \"transmission\" text,\n \"on_demand\" text\n);\n\nQuestion: Name the Years which have Transmission of digital satellite, an On demand of no, and a Free or pay of free + ppv?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"current_providers\" WHERE \"transmission\"='digital satellite' AND \"on_demand\"='no' AND \"free_or_pay\"='free + ppv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_providers\" (\n \"provider\" text,\n \"years\" text,\n \"free_or_pay\" text,\n \"transmission\" text,\n \"on_demand\" text\n);\n\nQuestion: What kind of Free or pay has Years of 2006\u2013 and a Provider of bt tv (formerly bt vision)?" }, { "role": "assistant", "content": "SELECT \"free_or_pay\" FROM \"current_providers\" WHERE \"years\"='2006\u2013' AND \"provider\"='bt tv (formerly bt vision)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_providers\" (\n \"provider\" text,\n \"years\" text,\n \"free_or_pay\" text,\n \"transmission\" text,\n \"on_demand\" text\n);\n\nQuestion: Name the Years that have a free + pay?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"current_providers\" WHERE \"free_or_pay\"='free + pay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_providers\" (\n \"provider\" text,\n \"years\" text,\n \"free_or_pay\" text,\n \"transmission\" text,\n \"on_demand\" text\n);\n\nQuestion: Which On demandhas a Free or pay of free and a Provider of freesat?" }, { "role": "assistant", "content": "SELECT \"on_demand\" FROM \"current_providers\" WHERE \"free_or_pay\"='free' AND \"provider\"='freesat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_providers\" (\n \"provider\" text,\n \"years\" text,\n \"free_or_pay\" text,\n \"transmission\" text,\n \"on_demand\" text\n);\n\nQuestion: Which On demand has a pay and a Provider of virgin media (formerly ntl:telewest)?" }, { "role": "assistant", "content": "SELECT \"on_demand\" FROM \"current_providers\" WHERE \"free_or_pay\"='pay' AND \"provider\"='virgin media (formerly ntl:telewest)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regional_free_to_air_dvb_t_television_ch\" (\n \"name\" text,\n \"region\" text,\n \"programming\" text,\n \"type\" text,\n \"encryption\" text\n);\n\nQuestion: What is the region for tv uskana?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"regional_free_to_air_dvb_t_television_ch\" WHERE \"name\"='tv uskana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regional_free_to_air_dvb_t_television_ch\" (\n \"name\" text,\n \"region\" text,\n \"programming\" text,\n \"type\" text,\n \"encryption\" text\n);\n\nQuestion: What is the region for tv vtv?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"regional_free_to_air_dvb_t_television_ch\" WHERE \"name\"='tv vtv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest Week with the Opponent Buffalo Bills?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"regular_season\" WHERE \"opponent\"='buffalo bills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Opponent has an Attendance greater than 14,431 during Week 3 at Bears Stadium Game site?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"attendance\">'14,431' AND \"game_site\"='bears stadium' AND \"week\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"date\" text,\n \"result\" text,\n \"competition\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Which Attendance is larger than 1,000, with a Competition of world cup, and a Venue of dublin?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2000s\" WHERE \"attendance\">'1,000' AND \"competition\"='world cup' AND \"venue\"='dublin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"date\" text,\n \"result\" text,\n \"competition\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Which Venue that has an Attendance larger than 1,000, and a Result of scotland 12-20 samoa?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"2000s\" WHERE \"attendance\">'1,000' AND \"result\"='scotland 12-20 samoa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"date\" text,\n \"result\" text,\n \"competition\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Which Competition has a Result of france 46-16 scotland?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"2000s\" WHERE \"result\"='france 46-16 scotland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" real,\n \"seat\" text,\n \"candidate\" text,\n \"party\" text,\n \"vote\" real,\n \"percentage\" text\n);\n\nQuestion: Which Percentage has a District larger than 2, and a Party of independent?" }, { "role": "assistant", "content": "SELECT \"percentage\" FROM \"results\" WHERE \"district\">2 AND \"party\"='independent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"district\" real,\n \"seat\" text,\n \"candidate\" text,\n \"party\" text,\n \"vote\" real,\n \"percentage\" text\n);\n\nQuestion: How many votes have a Seat of house A, and a Percentage of 75.44%, and a District smaller than 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"vote\") FROM \"results\" WHERE \"seat\"='house a' AND \"percentage\"='75.44%' AND \"district\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation has more than 1 bronze and less than 3 silver?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"bronze\">1 AND \"silver\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the highest number of silver for 9 bronze and less than 27 total?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"bronze\"=9 AND \"total\"<27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tier_i_financial_institutions\" (\n \"rank\" text,\n \"bank\" text,\n \"assets_usd_millions\" real,\n \"market_share\" text,\n \"number_of_branches\" real\n);\n\nQuestion: What is the Market Share that has Assets of 25 Million and a rank of 23?" }, { "role": "assistant", "content": "SELECT \"market_share\" FROM \"tier_i_financial_institutions\" WHERE \"assets_usd_millions\"=25 AND \"rank\"='23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tier_i_financial_institutions\" (\n \"rank\" text,\n \"bank\" text,\n \"assets_usd_millions\" real,\n \"market_share\" text,\n \"number_of_branches\" real\n);\n\nQuestion: What is the highest Assets (USD) Millions from Equity Bank and less than 44 branches?" }, { "role": "assistant", "content": "SELECT MAX(\"assets_usd_millions\") FROM \"tier_i_financial_institutions\" WHERE \"bank\"='equity bank' AND \"number_of_branches\"<44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is Score, when Attendance is \"349\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"replays\" WHERE \"attendance\"='349';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is Score, when Away Team is \"Newcastle Benfield\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"replays\" WHERE \"away_team\"='newcastle benfield';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is Score, when Tie No is \"30\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"replays\" WHERE \"tie_no\"='30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is Score, when Tie No is \"109\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"replays\" WHERE \"tie_no\"='109';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replays\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is Away Team, when Tie No is \"37\"?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"replays\" WHERE \"tie_no\"='37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vowel_plus_consonant_cluster\" (\n \"letter\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is the Australian for the American \u0251?" }, { "role": "assistant", "content": "SELECT \"australian\" FROM \"vowel_plus_consonant_cluster\" WHERE \"american\"='\u0251';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vowel_plus_consonant_cluster\" (\n \"letter\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is the Australian equivalent to i /\u026a/?" }, { "role": "assistant", "content": "SELECT \"australian\" FROM \"vowel_plus_consonant_cluster\" WHERE \"letter\"='i /\u026a/';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vowel_plus_consonant_cluster\" (\n \"letter\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is the British for the Australian \u0254?" }, { "role": "assistant", "content": "SELECT \"british\" FROM \"vowel_plus_consonant_cluster\" WHERE \"australian\"='\u0254';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vowel_plus_consonant_cluster\" (\n \"letter\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is the American version of the British \u0259?" }, { "role": "assistant", "content": "SELECT \"american\" FROM \"vowel_plus_consonant_cluster\" WHERE \"british\"='\u0259';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vowel_plus_consonant_cluster\" (\n \"letter\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What are the examples for the Australian \u00e6?" }, { "role": "assistant", "content": "SELECT \"examples\" FROM \"vowel_plus_consonant_cluster\" WHERE \"australian\"='\u00e6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vowel_plus_consonant_cluster\" (\n \"letter\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is the letter for the Brisish \u0252?" }, { "role": "assistant", "content": "SELECT \"letter\" FROM \"vowel_plus_consonant_cluster\" WHERE \"british\"='\u0252';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What's the 7am show that has local programs at 7:30am and 6:30pm?" }, { "role": "assistant", "content": "SELECT \"7_00_am\" FROM \"spring_2001\" WHERE \"6_30_pm\"='local programs' AND \"7_30_am\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the 3pm show that has Men In Black (mon-thu) Pok\u00e9mon (fri) at 7am?" }, { "role": "assistant", "content": "SELECT \"3_00_pm\" FROM \"spring_2001\" WHERE \"7_00_am\"='men in black (mon-thu) pok\u00e9mon (fri)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the 7am show that has All My Children at 1:30pm?" }, { "role": "assistant", "content": "SELECT \"7_00_am\" FROM \"spring_2001\" WHERE \"1_30_pm\"='all my children';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the 8am show that has Passions showing at 2pm?" }, { "role": "assistant", "content": "SELECT \"8_00_am\" FROM \"spring_2001\" WHERE \"2_00_pm\"='passions';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the 6:30pm show that has The Early Show at 8am and Local Programs at 9am?" }, { "role": "assistant", "content": "SELECT \"6_30_pm\" FROM \"spring_2001\" WHERE \"9_00_am\"='local programs' AND \"8_00_am\"='the early show';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the 1pm show that has Local Programs at 2pm and Digimon: Digital Monsters at 4:30pm?" }, { "role": "assistant", "content": "SELECT \"1_00_pm\" FROM \"spring_2001\" WHERE \"2_00_pm\"='local programs' AND \"4_30_pm\"='digimon: digital monsters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_queen_mary_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was the 1st member with 2nd member Thomas Leigh and was elected in 1557/58?" }, { "role": "assistant", "content": "SELECT \"1st_member\" FROM \"parliaments_of_queen_mary_i\" WHERE \"2nd_member\"='thomas leigh' AND \"elected\"='1557/58';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_queen_mary_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who is the second member that was elected in 1555?" }, { "role": "assistant", "content": "SELECT \"2nd_member\" FROM \"parliaments_of_queen_mary_i\" WHERE \"elected\"='1555';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_queen_mary_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was dissolved that was elected in 1553?" }, { "role": "assistant", "content": "SELECT \"dissolved\" FROM \"parliaments_of_queen_mary_i\" WHERE \"elected\"='1553';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which Pick has a Nationality of canada, and a Player of dennis maxwell?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"player\"='dennis maxwell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which Player has a Draft of 1994, a Pick larger than 8, a Round of 10, and a Nationality of canada?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"draft\"=1994 AND \"pick\">8 AND \"round\"='10' AND \"nationality\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which Player has a Round of 7, a Pick larger than 187, a Nationality of united states, and a Draft larger than 2000?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\"='7' AND \"pick\">187 AND \"nationality\"='united states' AND \"draft\">2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which Player has a Round of 9, and a Pick of 263?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\"='9' AND \"pick\"=263;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which Draft has a Round of 1, a Nationality of canada, a Pick of 1, and a Player of vincent lecavalier?" }, { "role": "assistant", "content": "SELECT AVG(\"draft\") FROM \"draft_picks\" WHERE \"round\"='1' AND \"nationality\"='canada' AND \"pick\"=1 AND \"player\"='vincent lecavalier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin_results\" (\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"points\" text,\n \"w_pct\" text,\n \"g_f\" text,\n \"g_a\" text,\n \"assists\" text,\n \"penalties\" text,\n \"p_i_m\" text\n);\n\nQuestion: What penalties has P.I.M. of 34.5?" }, { "role": "assistant", "content": "SELECT \"penalties\" FROM \"round_robin_results\" WHERE \"p_i_m\"='34.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin_results\" (\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"points\" text,\n \"w_pct\" text,\n \"g_f\" text,\n \"g_a\" text,\n \"assists\" text,\n \"penalties\" text,\n \"p_i_m\" text\n);\n\nQuestion: What wins has WPct of 0.2?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"round_robin_results\" WHERE \"w_pct\"='0.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin_results\" (\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"points\" text,\n \"w_pct\" text,\n \"g_f\" text,\n \"g_a\" text,\n \"assists\" text,\n \"penalties\" text,\n \"p_i_m\" text\n);\n\nQuestion: What WPct has wins of wins?" }, { "role": "assistant", "content": "SELECT \"w_pct\" FROM \"round_robin_results\" WHERE \"wins\"='wins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin_results\" (\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"points\" text,\n \"w_pct\" text,\n \"g_f\" text,\n \"g_a\" text,\n \"assists\" text,\n \"penalties\" text,\n \"p_i_m\" text\n);\n\nQuestion: What assists has points of 10?" }, { "role": "assistant", "content": "SELECT \"assists\" FROM \"round_robin_results\" WHERE \"points\"='10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin_results\" (\n \"team\" text,\n \"wins\" text,\n \"losses\" text,\n \"points\" text,\n \"w_pct\" text,\n \"g_f\" text,\n \"g_a\" text,\n \"assists\" text,\n \"penalties\" text,\n \"p_i_m\" text\n);\n\nQuestion: What losses consist of the team of japan?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"round_robin_results\" WHERE \"team\"='japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"starters_for_3_different_teams\" (\n \"quarterback\" text,\n \"games\" real,\n \"teams\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" real\n);\n\nQuestion: How many wins have more than 1 loss and a team of chiefs?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"starters_for_3_different_teams\" WHERE \"teams\"='chiefs' AND \"losses\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" text,\n \"avg_g\" real\n);\n\nQuestion: What was the total yards lost by antwon bailey when he gained 227?" }, { "role": "assistant", "content": "SELECT MIN(\"loss\") FROM \"rushing\" WHERE \"name\"='antwon bailey' AND \"gain\">227;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many wins when points are more than 51, goals against are more than 23 and losses are 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"league_standings\" WHERE \"points\">51 AND \"goals_against\">23 AND \"losses\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many wins when there are more than 19 points, place smaller than 12, and fewer than 30 played?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"league_standings\" WHERE \"points\">19 AND \"position\"<12 AND \"played\"<30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the number played by the team in place greater than 16?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"league_standings\" WHERE \"position\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What are the 2nd round results for the match with Girondins de Bordeaux (d1) as Team 2?" }, { "role": "assistant", "content": "SELECT \"2nd_round\" FROM \"round_of_16\" WHERE \"team_2\"='girondins de bordeaux (d1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What was the 1st round result that had US Valenciennes (d1) as Team 2?" }, { "role": "assistant", "content": "SELECT \"1st_round\" FROM \"round_of_16\" WHERE \"team_2\"='us valenciennes (d1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What was the Score of the match with USL Dunkerque (d2) as Team 2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"round_of_16\" WHERE \"team_2\"='usl dunkerque (d2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2003_2004_season\" text\n);\n\nQuestion: What club does Manuel Fernandes coach?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"team_summaries\" WHERE \"head_coach\"='manuel fernandes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2003_2004_season\" text\n);\n\nQuestion: Who is the head coach for the club from Estoril?" }, { "role": "assistant", "content": "SELECT \"head_coach\" FROM \"team_summaries\" WHERE \"city\"='estoril';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2003_2004_season\" text\n);\n\nQuestion: Who is the head coach for the club from Aveiro?" }, { "role": "assistant", "content": "SELECT \"head_coach\" FROM \"team_summaries\" WHERE \"city\"='aveiro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_8_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Team 1, when Team 2 is \"Iskra Odintsovo\"?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"1_8_finals\" WHERE \"team_2\"='iskra odintsovo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_8_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is 1st Leg, when Team 1 is \"Portol Palma Mallorca\"?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"1_8_finals\" WHERE \"team_1\"='portol palma mallorca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_8_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Agg., when Team 1 is \"Noliko Maaseik\"?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"1_8_finals\" WHERE \"team_1\"='noliko maaseik';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"players\" text,\n \"position\" text,\n \"year\" text,\n \"ht_wt\" text,\n \"bats_throws\" text,\n \"hometown_last_school\" text\n);\n\nQuestion: What is Jake Johnson's position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"players\" WHERE \"players\"='jake johnson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"players\" text,\n \"position\" text,\n \"year\" text,\n \"ht_wt\" text,\n \"bats_throws\" text,\n \"hometown_last_school\" text\n);\n\nQuestion: What side does Clayton Allison Bat/Throw from?" }, { "role": "assistant", "content": "SELECT \"bats_throws\" FROM \"players\" WHERE \"players\"='clayton allison';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players\" (\n \"players\" text,\n \"position\" text,\n \"year\" text,\n \"ht_wt\" text,\n \"bats_throws\" text,\n \"hometown_last_school\" text\n);\n\nQuestion: What side does Ryan Overland Bat/Throws from?" }, { "role": "assistant", "content": "SELECT \"bats_throws\" FROM \"players\" WHERE \"players\"='ryan overland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\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 2nd leg of pelister team 2?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"eighth_finals\" WHERE \"team_2\"='pelister';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\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 with cementarnica as team 2?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"eighth_finals\" WHERE \"team_2\"='cementarnica';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\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 2 with turnovo as team 1?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"eighth_finals\" WHERE \"team_1\"='turnovo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\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 with tikve\u0161 as team 2?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"eighth_finals\" WHERE \"team_2\"='tikve\u0161';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Score is \"69-69=138\", and when Country is \"United States\"?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='69-69=138' AND \"country\"='united states';" } ]