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 \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the competition when the score was 3-0?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2002_nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Akin Ayodele drafted before round 7 plays what position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"2002_nfl_draft\" WHERE \"round\"<7 AND \"name\"='akin ayodele';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2002_nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total overall for the pick that went before round 4, who went to Tennessee for college, and was picked at a number bigger than 9?" }, { "role": "assistant", "content": "SELECT SUM(\"overall\") FROM \"2002_nfl_draft\" WHERE \"round\"<4 AND \"college\"='tennessee' AND \"pick_num\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2002_nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick number average for the player who was drafted before round 7, and went to college at Tennessee?" }, { "role": "assistant", "content": "SELECT AVG(\"pick_num\") FROM \"2002_nfl_draft\" WHERE \"round\"<7 AND \"college\"='tennessee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_new_york_rangers_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What visiting team played at the home of the Chicago Black Hawks with a record of 1-1?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"chicago_black_hawks_4_new_york_rangers_3\" WHERE \"home\"='chicago black hawks' AND \"record\"='1-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_new_york_rangers_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What home team has a record of 4-3?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"chicago_black_hawks_4_new_york_rangers_3\" WHERE \"record\"='4-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_new_york_rangers_3\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What visiting team has a record of 4-3?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"chicago_black_hawks_4_new_york_rangers_3\" WHERE \"record\"='4-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the highest league up with less than 3 championships, a total less than 2, and a FA cup larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"league_cup\") FROM \"yellow_cards\" WHERE \"championship\"<3 AND \"total\"<2 AND \"fa_cup\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the average total for less than 1 championship?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"yellow_cards\" WHERE \"championship\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What i the total number of championships less than 2, and a league cup larger than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"yellow_cards\" WHERE \"championship\"<2 AND \"league_cup\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team has a score of 2\u20131, when the away team was Telford United?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"score\"='2\u20131' AND \"away_team\"='telford united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the way team was Wrexham?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='wrexham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the home team when the Tie no is 1?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"tie_no\"='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 was Eduardo Romero's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='eduardo romero';" } ]
[ { "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: Where was the score 67-71-70=208?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='67-71-70=208';" } ]
[ { "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 was the score when Fred Couples played in the United States and placed t9?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round\" WHERE \"country\"='united states' AND \"place\"='t9' 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 \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country does Gary Koch play for?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='gary koch';" } ]
[ { "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: Who plays for Zimbabwe?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"country\"='zimbabwe';" } ]
[ { "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 was the To par when the place was 4?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: What is the current club with a position of sg/sf and a height less than 1.96?" }, { "role": "assistant", "content": "SELECT \"current_club\" FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"position\"='sg/sf' AND \"height\"<1.96;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: What year was Rowan Barrett born?" }, { "role": "assistant", "content": "SELECT \"year_born_age\" FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"player\"='rowan barrett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: What is the lowest height for Rans Brempong?" }, { "role": "assistant", "content": "SELECT MIN(\"height\") FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"player\"='rans brempong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: When was the result 0\u20133?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fa_premier_league\" WHERE \"result\"='0\u20133';" } ]
[ { "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: What is the result of the match on 9 September 2009?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='9 september 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: What is the name of the player that was loaned out on 13 August 2008 ?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"loan_out\" WHERE \"date_from\"='13 august 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: When was febian brandy loaned out until, when was loaned out on 2 february 2009.?" }, { "role": "assistant", "content": "SELECT \"date_to\" FROM \"loan_out\" WHERE \"name\"='febian brandy' AND \"date_from\"='2 february 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: When was james chester loaned out until ?" }, { "role": "assistant", "content": "SELECT \"date_to\" FROM \"loan_out\" WHERE \"name\"='james chester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: Where did the player loaned out on 27 november 2008 move to ?" }, { "role": "assistant", "content": "SELECT \"moving_to\" FROM \"loan_out\" WHERE \"date_from\"='27 november 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: When was ron-robert zieler loaned out until ?" }, { "role": "assistant", "content": "SELECT \"date_to\" FROM \"loan_out\" WHERE \"name\"='ron-robert zieler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loan_out\" (\n \"date_from\" text,\n \"date_to\" text,\n \"pos\" text,\n \"name\" text,\n \"moving_to\" text\n);\n\nQuestion: Where did the player in Pos mf, move to until 30 june 2009 ?" }, { "role": "assistant", "content": "SELECT \"moving_to\" FROM \"loan_out\" WHERE \"date_to\"='30 june 2009' AND \"pos\"='mf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"name\" text,\n \"club\" text,\n \"date_of_departure\" text,\n \"replacement\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the name of the manager who was replaced by michael skibbe?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"managerial_changes\" WHERE \"replacement\"='michael skibbe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"name\" text,\n \"club\" text,\n \"date_of_departure\" text,\n \"replacement\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the club the used aykut kocaman as the replacement?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"managerial_changes\" WHERE \"replacement\"='aykut kocaman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"name\" text,\n \"club\" text,\n \"date_of_departure\" text,\n \"replacement\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the date of appointment of nejat biyedi\u0107?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"name\"='nejat biyedi\u0107';" } ]
[ { "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 \"streak\" text\n);\n\nQuestion: When did they play at the wachovia center?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='wachovia center';" } ]
[ { "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 \"streak\" text\n);\n\nQuestion: What game number was played at amway arena?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"game_log\" WHERE \"location_attendance\"='amway arena';" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many medals were won total for the country that won 1 silver and was ranked 2 or lower?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"silver\"=1 AND \"rank\"<2;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silvers did the country with more than 0 gold and a rank above 1 win that had a total less than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"gold\">0 AND \"rank\">1 AND \"total\"<4;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes were won by the country with a total higher than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"total\">5;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes were won for the country that had a larger than 3 rank and a silver win count above 0?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"rank\">3 AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_goals\" (\n \"name\" text,\n \"years\" text,\n \"mls_cup\" real,\n \"u_s_open_cup\" real,\n \"concacaf\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: What is the highest value for Other that has CONCACAF value of 0 a U.S. Open Cup larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"other\") FROM \"most_goals\" WHERE \"u_s_open_cup\">0 AND \"concacaf\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"name\" text,\n \"area_km\" real,\n \"pop\" real,\n \"pop_area_1_km\" real,\n \"no_p\" real,\n \"no_c_no_t\" text,\n \"subregion\" text\n);\n\nQuestion: Which Subregion has a No P. of 4, and a Pop/Area (1/km\u00b2) of 534?" }, { "role": "assistant", "content": "SELECT \"subregion\" FROM \"municipalities\" WHERE \"no_p\"=4 AND \"pop_area_1_km\"=534;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"name\" text,\n \"area_km\" real,\n \"pop\" real,\n \"pop_area_1_km\" real,\n \"no_p\" real,\n \"no_c_no_t\" text,\n \"subregion\" text\n);\n\nQuestion: Which Pop/Area (1/km\u00b2) has a No P. larger than 1, and a Name of albergaria-a-velha?" }, { "role": "assistant", "content": "SELECT AVG(\"pop_area_1_km\") FROM \"municipalities\" WHERE \"no_p\">1 AND \"name\"='albergaria-a-velha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"name\" text,\n \"area_km\" real,\n \"pop\" real,\n \"pop_area_1_km\" real,\n \"no_p\" real,\n \"no_c_no_t\" text,\n \"subregion\" text\n);\n\nQuestion: Which Area (km\u00b2) is the lowest one that has a Population of 17,089?" }, { "role": "assistant", "content": "SELECT MIN(\"area_km\") FROM \"municipalities\" WHERE \"pop\"='17,089';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team on 4 February 1987 when Luton Town was away team and there was no replay?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='replay' AND \"date\"='4 february 1987' AND \"away_team\"='luton town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score on 31 January 1987 with tie number 1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"date\"='31 january 1987' AND \"tie_no\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team on 31 January 1987 when the home team was Wimbledon?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"date\"='31 january 1987' AND \"home_team\"='wimbledon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"rank\" text,\n \"country\" text,\n \"highest_point\" text,\n \"height_m\" real,\n \"height_ft\" real\n);\n\nQuestion: How high is Macedonia's highest point?" }, { "role": "assistant", "content": "SELECT \"height_ft\" FROM \"notes\" WHERE \"country\"='macedonia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bush_battles\" (\n \"battle_no\" real,\n \"broadcast_date\" text,\n \"name_of_battle\" text,\n \"theme\" text,\n \"celebrities_taking_part\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"notes\" text\n);\n\nQuestion: What is the theme with dani as the winner?" }, { "role": "assistant", "content": "SELECT \"theme\" FROM \"bush_battles\" WHERE \"winner\"='dani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bush_battles\" (\n \"battle_no\" real,\n \"broadcast_date\" text,\n \"name_of_battle\" text,\n \"theme\" text,\n \"celebrities_taking_part\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes of the patience theme?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"bush_battles\" WHERE \"theme\"='patience';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the round when the position is (c)?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"position\"='(c)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the round for jake gardiner?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"draft_picks\" WHERE \"player\"='jake gardiner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the college/junior/club team (league) when the round is higher than 1, the nationality is canada and the position is (d)?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\">1 AND \"nationality\"='canada' AND \"position\"='(d)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the position when the round is higher than 3, the nationality is united states and the player is nick pryor?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"round\">3 AND \"nationality\"='united states' AND \"player\"='nick pryor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: what is the college/junior/club team (league) when the position is (c) and the round is higher than 2?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"position\"='(c)' AND \"round\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: When the team Heathmere of the South West DFL won more than 11 games, what is the maximum byes?" }, { "role": "assistant", "content": "SELECT MAX(\"byes\") FROM \"2011_ladder\" WHERE \"south_west_dfl\"='heathmere' AND \"wins\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the most games lost when the against is greater than 1401, and the draws greater than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"2011_ladder\" WHERE \"draws\">0 AND \"against\">1401;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the maximum draws when less than 2514 is the against, and less than 0 byes?" }, { "role": "assistant", "content": "SELECT MAX(\"draws\") FROM \"2011_ladder\" WHERE \"against\"<2514 AND \"byes\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the wins average when 17 games were lost?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"2011_ladder\" WHERE \"losses\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stadium_and_locations\" (\n \"club\" text,\n \"short_name\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What stadium is in the city of Debrecen?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"stadium_and_locations\" WHERE \"city\"='debrecen';" } ]
[ { "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 is the number of silver when rank was 5, and a bronze was smaller than 14?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"rank\"='5' AND \"bronze\"<14;" } ]
[ { "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 is the highest bronze number when silver is 0, and the total is smaller than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=0 AND \"total\"<1;" } ]
[ { "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 is the total when the nation was Argentina, and a Goldwas smaller than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"nation\"='argentina' AND \"gold\"<0;" } ]
[ { "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 is the nation when bronze is less than 7, gold is larger than 0, total is larger than 7, and silver is smaller than 3?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"bronze\"<7 AND \"gold\">0 AND \"total\">7 AND \"silver\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: What date was the game against manchester city when they had a league position of 2nd?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fa_premier_league\" WHERE \"h_a\"='a' AND \"league_position\"='2nd' AND \"opponents\"='manchester city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: What is the result F-A of the game on 6 march 1993?" }, { "role": "assistant", "content": "SELECT \"result_f_a\" FROM \"fa_premier_league\" WHERE \"date\"='6 march 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: What is the result F-A of the game on 3 may 1993?" }, { "role": "assistant", "content": "SELECT \"result_f_a\" FROM \"fa_premier_league\" WHERE \"date\"='3 may 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Tie no, when Date is \"18 Nov 1989\", and when Home Team is \"Doncaster Rovers\"?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"date\"='18 nov 1989' AND \"home_team\"='doncaster rovers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Score, when Away Team is \"Yeovil Town\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"away_team\"='yeovil town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Home Team, when Tie no is \"27\"?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Date, when Tie no is \"37\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" 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 \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Home Team, when Date is \"22 Nov 1989\", and when Away Team is \"Bath City\"?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"date\"='22 nov 1989' AND \"away_team\"='bath city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"year\" text,\n \"channel\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"studio_host\" text\n);\n\nQuestion: What year was the play-by-play for Don Earle?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"1970s\" WHERE \"play_by_play\"='don earle';" } ]
[ { "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: What is Tom Kite with a Score of 68's To Par?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=68 AND \"player\"='tom kite';" } ]
[ { "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: What is Tom Kite's Place?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"first_round\" WHERE \"player\"='tom kite';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"televoting_results\" (\n \"draw\" real,\n \"televotes\" text,\n \"televote_points\" text,\n \"jury_points\" text,\n \"total\" text,\n \"final_points\" text\n);\n\nQuestion: What is the televote points for 0 jury points and 23 draws?" }, { "role": "assistant", "content": "SELECT \"televote_points\" FROM \"televoting_results\" WHERE \"jury_points\"='0' AND \"draw\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missouri\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What district was a republican first elected in 2000?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"missouri\" WHERE \"first_elected\"=2000 AND \"party\"='republican';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missouri\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: In what district was incumbent Russ Carnahan elected after 2000?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"missouri\" WHERE \"first_elected\">2000 AND \"incumbent\"='russ carnahan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_fa_cup_third_fourth_place_matche\" (\n \"season\" text,\n \"date\" text,\n \"winner\" text,\n \"loser\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: For which venue did Leicester City lose?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"list_of_fa_cup_third_fourth_place_matche\" WHERE \"loser\"='leicester city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_fa_cup_third_fourth_place_matche\" (\n \"season\" text,\n \"date\" text,\n \"winner\" text,\n \"loser\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What season did Stoke City win?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"list_of_fa_cup_third_fourth_place_matche\" WHERE \"winner\"='stoke city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_fa_cup_third_fourth_place_matche\" (\n \"season\" text,\n \"date\" text,\n \"winner\" text,\n \"loser\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for St Andrew's?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"list_of_fa_cup_third_fourth_place_matche\" WHERE \"venue\"='st andrew''s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_fa_cup_third_fourth_place_matche\" (\n \"season\" text,\n \"date\" text,\n \"winner\" text,\n \"loser\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What season did Wolverhampton Wanderers win?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"list_of_fa_cup_third_fourth_place_matche\" WHERE \"winner\"='wolverhampton wanderers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_kjth\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which Call sign has an ERP W of 75?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"broadcast_translators_of_kjth\" WHERE \"erp_w\"=75;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_kjth\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which Class has a Facility ID greater than 85076 and a Call Sign of K289au?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"broadcast_translators_of_kjth\" WHERE \"facility_id\">85076 AND \"call_sign\"='k289au';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year was jack cole nominated?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"original_broadway_production\" WHERE \"nominee\"='jack cole';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What award ceremony was howard bay and patton campbell nominated?" }, { "role": "assistant", "content": "SELECT \"award_ceremony\" FROM \"original_broadway_production\" WHERE \"nominee\"='howard bay and patton campbell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is Visitor, when Date is \"May 9\"?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"date\"='may 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Home is \"Montreal Canadiens\", and when Date is \"May 16\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"home\"='montreal canadiens' AND \"date\"='may 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Date is \"May 11\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"date\"='may 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is Visitor, when Home is \"Chicago Black Hawks\", and when Date is \"May 4\"?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"home\"='chicago black hawks' AND \"date\"='may 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Record is \"2-0\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"record\"='2-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competitive\" (\n \"date\" text,\n \"tournament\" text,\n \"round\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score_1\" text\n);\n\nQuestion: Which tournament included the round played on 14 May?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"competitive\" WHERE \"date\"='14 may';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competitive\" (\n \"date\" text,\n \"tournament\" text,\n \"round\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score_1\" text\n);\n\nQuestion: Which round was played on 10 May?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"competitive\" WHERE \"date\"='10 may';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participants\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"national_final\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the language when the points is more than 119 and the place is higher than 5?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"participants\" WHERE \"points\">119 AND \"place\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participants\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"national_final\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the highest place when the national final is 4th and the points is less than 139?" }, { "role": "assistant", "content": "SELECT MAX(\"place\") FROM \"participants\" WHERE \"national_final\"='4th' AND \"points\"<139;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participants\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"national_final\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the lowest place when the language is croatian?" }, { "role": "assistant", "content": "SELECT MIN(\"place\") FROM \"participants\" WHERE \"language\"='croatian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participants\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"national_final\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the language when the english translation is come to me?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"participants\" WHERE \"english_translation\"='come to me';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participants\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"national_final\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the song when the points is more than 64, the national final is 4th and draw is more than 3?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"participants\" WHERE \"points\">64 AND \"national_final\"='4th' AND \"draw\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is Category, when Result is \"Nominated\", when Award is \"Drama Desk Award\", and when Nominee is \"Nathan Lane\"?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"original_broadway_production\" WHERE \"result\"='nominated' AND \"award\"='drama desk award' AND \"nominee\"='nathan lane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is Category, when Result is \"Won\", and when Nominee is \"Bebe Neuwirth\"?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"original_broadway_production\" WHERE \"result\"='won' AND \"nominee\"='bebe neuwirth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is the total number of Year, when Result is \"Nominated\", when Category is \"Outstanding Actor in a Musical\", and when Award is \"Drama Desk Award\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"original_broadway_production\" WHERE \"result\"='nominated' AND \"category\"='outstanding actor in a musical' AND \"award\"='drama desk award';" } ]