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 \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: How many clubs were remaining in the preliminary round?" }, { "role": "assistant", "content": "SELECT \"clubs_remaining\" FROM \"teams\" WHERE \"round\"='Preliminary round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: What was the round when there were 16 winners from the previous round?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"teams\" WHERE \"winners_from_previous_round\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: How many clubs were involved in the second round?" }, { "role": "assistant", "content": "SELECT \"clubs_involved\" FROM \"teams\" WHERE \"round\"='Second round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wta_tour\" (\n \"week\" real,\n \"start_date\" text,\n \"type\" text,\n \"tournament\" text,\n \"surface\" text,\n \"town\" text,\n \"country\" text,\n \"continent\" text,\n \"prize_money\" text\n);\n\nQuestion: When grand prix de sar la princesse lalla meryem is the tournament what is the town?" }, { "role": "assistant", "content": "SELECT \"town\" FROM \"wta_tour\" WHERE \"tournament\"='Grand Prix De SAR La Princesse Lalla Meryem';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wta_tour\" (\n \"week\" real,\n \"start_date\" text,\n \"type\" text,\n \"tournament\" text,\n \"surface\" text,\n \"town\" text,\n \"country\" text,\n \"continent\" text,\n \"prize_money\" text\n);\n\nQuestion: When stuttgart is the town what is the type?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"wta_tour\" WHERE \"town\"='Stuttgart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selected_entries\" (\n \"entrant\" text,\n \"constructor\" text,\n \"car\" text,\n \"driver\" text,\n \"co_driver\" text,\n \"rounds\" text\n);\n\nQuestion: who is the person that is part of the belgian vw club that works with fr\u00e9d\u00e9ric miclotte" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"selected_entries\" WHERE \"entrant\"='Belgian VW Club' AND \"co_driver\"='Fr\u00e9d\u00e9ric Miclotte';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selected_entries\" (\n \"entrant\" text,\n \"constructor\" text,\n \"car\" text,\n \"driver\" text,\n \"co_driver\" text,\n \"rounds\" text\n);\n\nQuestion: what is the type of vehicle driven by mark higgins" }, { "role": "assistant", "content": "SELECT \"car\" FROM \"selected_entries\" WHERE \"driver\"='Mark Higgins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selected_entries\" (\n \"entrant\" text,\n \"constructor\" text,\n \"car\" text,\n \"driver\" text,\n \"co_driver\" text,\n \"rounds\" text\n);\n\nQuestion: what is the entry where the other person is zden\u011bk hr\u016fza" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"selected_entries\" WHERE \"co_driver\"='Zden\u011bk Hr\u016fza';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selected_entries\" (\n \"entrant\" text,\n \"constructor\" text,\n \"car\" text,\n \"driver\" text,\n \"co_driver\" text,\n \"rounds\" text\n);\n\nQuestion: who is the other person where the assistant is paulo babo" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"selected_entries\" WHERE \"co_driver\"='Paulo Babo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selected_entries\" (\n \"entrant\" text,\n \"constructor\" text,\n \"car\" text,\n \"driver\" text,\n \"co_driver\" text,\n \"rounds\" text\n);\n\nQuestion: what are all the people where the entries is peugeot sport polska" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"selected_entries\" WHERE \"entrant\"='Peugeot Sport Polska';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28037619_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote the episode that had 6.05 million U.s. viewers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_28037619_2\" WHERE \"u_s_viewers_million\"='6.05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28037619_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many production codes are there for the episode that had 4.36 million u.s. viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"production_code\") FROM \"table1_28037619_2\" WHERE \"u_s_viewers_million\"='4.36';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28037619_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many people wrote the episode that had 7.26 million u.s. viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_28037619_2\" WHERE \"u_s_viewers_million\"='7.26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28037619_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many million u.s. viewers saw the episode that was directed by roger young and written by debra j. fisher?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_28037619_2\" WHERE \"directed_by\"='Roger Young' AND \"written_by\"='Debra J. Fisher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28037619_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the name of the episode written by David Matthews?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_28037619_2\" WHERE \"written_by\"='David Matthews';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"nickname\" text,\n \"location\" text,\n \"colors\" text,\n \"tenure\" text\n);\n\nQuestion: What are the colors of the Hudson school?" }, { "role": "assistant", "content": "SELECT \"colors\" FROM \"former_members\" WHERE \"school\"='Hudson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"nickname\" text,\n \"location\" text,\n \"colors\" text,\n \"tenure\" text\n);\n\nQuestion: When were the members tenured in the Field school?" }, { "role": "assistant", "content": "SELECT \"tenure\" FROM \"former_members\" WHERE \"school\"='Field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many pick# for CFL team of Toronto Argonauts?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"round_one\" WHERE \"cfl_team\"='Toronto Argonauts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is every CFL team from the Calgary college?" }, { "role": "assistant", "content": "SELECT \"cfl_team\" FROM \"round_one\" WHERE \"college\"='Calgary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is every position for the CFL Edmonton?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_one\" WHERE \"cfl_team\"='Edmonton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is every CFL team for the college of Calgary?" }, { "role": "assistant", "content": "SELECT \"cfl_team\" FROM \"round_one\" WHERE \"college\"='Calgary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is every CFL team with pick#1?" }, { "role": "assistant", "content": "SELECT \"cfl_team\" FROM \"round_one\" WHERE \"pick_num\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is every CFL team with the player Mark Farraway?" }, { "role": "assistant", "content": "SELECT \"cfl_team\" FROM \"round_one\" WHERE \"player\"='Mark Farraway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What draft pick number was Andy Brereton?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_five\" WHERE \"player\"='Andy Brereton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What pick number was the player that was picked by Edmonton?" }, { "role": "assistant", "content": "SELECT \"pick_num\" FROM \"round_five\" WHERE \"cfl_team\"='Edmonton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position did the draft pick going to saskatchewan play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_five\" WHERE \"cfl_team\"='Saskatchewan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest numbered draft pick?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"round_five\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What CFL team got the player from york?" }, { "role": "assistant", "content": "SELECT \"cfl_team\" FROM \"round_five\" WHERE \"college\"='York';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many positions does Trent Bagnail play?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"round_five\" WHERE \"player\"='Trent Bagnail';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position was the player who was drafted by Edmonton?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_six\" WHERE \"cfl_team\"='Edmonton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did the player whose position was RB go to? " }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_six\" WHERE \"position\"='RB';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did Francis Bellefroid go to? " }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_six\" WHERE \"player\"='Francis Bellefroid';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player was drafted by Winnipeg? " }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_six\" WHERE \"cfl_team\"='Winnipeg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_six\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did the player who was drafted by Calgary go to?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_six\" WHERE \"cfl_team\"='Calgary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represent\" real,\n \"contestant\" text,\n \"age\" real,\n \"height\" text,\n \"hometown\" text,\n \"sponsor\" text\n);\n\nQuestion: What was the height of representative #1?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"contestants\" WHERE \"represent\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represent\" real,\n \"contestant\" text,\n \"age\" real,\n \"height\" text,\n \"hometown\" text,\n \"sponsor\" text\n);\n\nQuestion: Which contestant was sponsored by Yogurt Vita Slim?" }, { "role": "assistant", "content": "SELECT \"contestant\" FROM \"contestants\" WHERE \"sponsor\"='Yogurt Vita Slim';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represent\" real,\n \"contestant\" text,\n \"age\" real,\n \"height\" text,\n \"hometown\" text,\n \"sponsor\" text\n);\n\nQuestion: What was the height of representative #6?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"contestants\" WHERE \"represent\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28081876_4\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: how many people wrote the episode directed by rob schrab?" }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_28081876_4\" WHERE \"directed_by\"='Rob Schrab';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28081876_4\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: name the title of the episode with production code 201" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_28081876_4\" WHERE \"production_code\"=201;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28081876_6\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who were the authors of the episode first broadcast on August 10, 2012?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_28081876_6\" WHERE \"original_air_date\"='August 10, 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28081876_6\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many million people in the US viewed the episode titled \"Behind the Scenes\"?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_28081876_6\" WHERE \"title\"='\\\"Behind the Scenes\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28081876_6\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: When was originally aired the episode with an audience of 1.57 million us viewers?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_28081876_6\" WHERE \"u_s_viewers_millions\"='1.57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28081876_6\" (\n \"series_no\" real,\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What season number was assigned to the episode identified with the production code 401? " }, { "role": "assistant", "content": "SELECT \"season_no\" FROM \"table1_28081876_6\" WHERE \"production_code\"=401;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assistants\" (\n \"position\" text,\n \"number\" real,\n \"player\" text,\n \"super_league\" real,\n \"champions_league\" real,\n \"swiss_cup\" real,\n \"total\" real\n);\n\nQuestion: List the number of assists for the DF." }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"top_assistants\" WHERE \"position\"='DF';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assistants\" (\n \"position\" text,\n \"number\" real,\n \"player\" text,\n \"super_league\" real,\n \"champions_league\" real,\n \"swiss_cup\" real,\n \"total\" real\n);\n\nQuestion: List the lowest super league for a 0 champion league." }, { "role": "assistant", "content": "SELECT MIN(\"super_league\") FROM \"top_assistants\" WHERE \"champions_league\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assistants\" (\n \"position\" text,\n \"number\" real,\n \"player\" text,\n \"super_league\" real,\n \"champions_league\" real,\n \"swiss_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the minimum sum?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"top_assistants\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"category_leadership_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification_ta_koszulka\" text,\n \"mountains_classification_klasyfikacja_g_rska\" text,\n \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" text,\n \"points_classification_klasyfikacja_punktowa\" text,\n \"teams_classification\" text\n);\n\nQuestion: What was the intermediate sprint classification for the race whose winner was Daniel Martin?" }, { "role": "assistant", "content": "SELECT \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" FROM \"category_leadership_table\" WHERE \"winner\"='Daniel Martin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"category_leadership_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification_ta_koszulka\" text,\n \"mountains_classification_klasyfikacja_g_rska\" text,\n \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" text,\n \"points_classification_klasyfikacja_punktowa\" text,\n \"teams_classification\" text\n);\n\nQuestion: Which teams classification winners had a general classification winner of Allan Davis?" }, { "role": "assistant", "content": "SELECT \"teams_classification\" FROM \"category_leadership_table\" WHERE \"general_classification_ta_koszulka\"='Allan Davis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"category_leadership_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification_ta_koszulka\" text,\n \"mountains_classification_klasyfikacja_g_rska\" text,\n \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" text,\n \"points_classification_klasyfikacja_punktowa\" text,\n \"teams_classification\" text\n);\n\nQuestion: Who won the points classification when the teams classification winner was Lampre-Farnese?" }, { "role": "assistant", "content": "SELECT \"points_classification_klasyfikacja_punktowa\" FROM \"category_leadership_table\" WHERE \"teams_classification\"='Lampre-Farnese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_slavic_languages\" (\n \"english_word\" text,\n \"slovak\" text,\n \"czech\" text,\n \"rusyn\" text,\n \"ukrainian\" text,\n \"belarusian\" text,\n \"polish\" text,\n \"serbo_croatian\" text,\n \"bulgarian\" text\n);\n\nQuestion: How do you say the ukrainian word \u0434\u044f\u043a\u0443\u044e (diakuju) in English?" }, { "role": "assistant", "content": "SELECT \"english_word\" FROM \"other_slavic_languages\" WHERE \"ukrainian\"='\u0414\u044f\u043a\u0443\u044e (diakuju)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_slavic_languages\" (\n \"english_word\" text,\n \"slovak\" text,\n \"czech\" text,\n \"rusyn\" text,\n \"ukrainian\" text,\n \"belarusian\" text,\n \"polish\" text,\n \"serbo_croatian\" text,\n \"bulgarian\" text\n);\n\nQuestion: How many words are there in rusyn for the bulgarian word \u043a\u0443\u043f\u0443\u0432\u0430 (kupuva)?" }, { "role": "assistant", "content": "SELECT COUNT(\"rusyn\") FROM \"other_slavic_languages\" WHERE \"bulgarian\"='\u043a\u0443\u043f\u0443\u0432\u0430 (kupuva)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28137918_5\" (\n \"religion\" text,\n \"births\" real,\n \"conversions\" text,\n \"new_adherents_per_year\" real,\n \"growth_rate\" text\n);\n\nQuestion: Name the new adherents per year for buddhism" }, { "role": "assistant", "content": "SELECT \"new_adherents_per_year\" FROM \"table1_28137918_5\" WHERE \"religion\"='Buddhism';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28137918_5\" (\n \"religion\" text,\n \"births\" real,\n \"conversions\" text,\n \"new_adherents_per_year\" real,\n \"growth_rate\" text\n);\n\nQuestion: Name the number of new adherents per year for confucianism" }, { "role": "assistant", "content": "SELECT COUNT(\"new_adherents_per_year\") FROM \"table1_28137918_5\" WHERE \"religion\"='Confucianism';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28137918_5\" (\n \"religion\" text,\n \"births\" real,\n \"conversions\" text,\n \"new_adherents_per_year\" real,\n \"growth_rate\" text\n);\n\nQuestion: Name the least births for conversion being 26,333" }, { "role": "assistant", "content": "SELECT MIN(\"births\") FROM \"table1_28137918_5\" WHERE \"conversions\"='26,333';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28137918_5\" (\n \"religion\" text,\n \"births\" real,\n \"conversions\" text,\n \"new_adherents_per_year\" real,\n \"growth_rate\" text\n);\n\nQuestion: Name the least amount of new adherents per year" }, { "role": "assistant", "content": "SELECT MIN(\"new_adherents_per_year\") FROM \"table1_28137918_5\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28137918_5\" (\n \"religion\" text,\n \"births\" real,\n \"conversions\" text,\n \"new_adherents_per_year\" real,\n \"growth_rate\" text\n);\n\nQuestion: Name the religion that has a growth rate of 1.56%" }, { "role": "assistant", "content": "SELECT \"religion\" FROM \"table1_28137918_5\" WHERE \"growth_rate\"='1.56%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"vessel\" text,\n \"built\" real,\n \"max_speed\" text,\n \"length\" text,\n \"breadth\" text,\n \"flag\" text,\n \"propulsion\" text\n);\n\nQuestion: What is the length when the propulsion is controllable pitch propeller?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"current_fleet\" WHERE \"propulsion\"='Controllable pitch propeller';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"vessel\" text,\n \"built\" real,\n \"max_speed\" text,\n \"length\" text,\n \"breadth\" text,\n \"flag\" text,\n \"propulsion\" text\n);\n\nQuestion: What is the max speed when the vessel is gallion?" }, { "role": "assistant", "content": "SELECT \"max_speed\" FROM \"current_fleet\" WHERE \"vessel\"='Gallion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"vessel\" text,\n \"built\" real,\n \"max_speed\" text,\n \"length\" text,\n \"breadth\" text,\n \"flag\" text,\n \"propulsion\" text\n);\n\nQuestion: How many breadth entries are there when the vessel is marianarray?" }, { "role": "assistant", "content": "SELECT COUNT(\"breadth\") FROM \"current_fleet\" WHERE \"vessel\"='Marianarray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"vessel\" text,\n \"built\" real,\n \"max_speed\" text,\n \"length\" text,\n \"breadth\" text,\n \"flag\" text,\n \"propulsion\" text\n);\n\nQuestion: What is the propulsion when the vessel is marianarray?" }, { "role": "assistant", "content": "SELECT \"propulsion\" FROM \"current_fleet\" WHERE \"vessel\"='Marianarray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"vessel\" text,\n \"built\" real,\n \"max_speed\" text,\n \"length\" text,\n \"breadth\" text,\n \"flag\" text,\n \"propulsion\" text\n);\n\nQuestion: How many breadth entries are there when propulsion is jet?" }, { "role": "assistant", "content": "SELECT COUNT(\"breadth\") FROM \"current_fleet\" WHERE \"propulsion\"='Jet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28116528_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the production code for \"chuck versus the balcony\"?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"table1_28116528_1\" WHERE \"title\"='\\\"Chuck Versus the Balcony\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28116528_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What episode title had a production code of 3x6306?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_28116528_1\" WHERE \"production_code\"='3X6306';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28116528_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What date did the episode with a production code of 3x6316 originally air?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_28116528_1\" WHERE \"production_code\"='3X6316';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who won the mens doubles when wu yang won the womens singles?" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"polish_open\" WHERE \"womens_singles\"='Wu Yang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: What year and where was the tournament when fan ying won the womens singles?" }, { "role": "assistant", "content": "SELECT \"year_location\" FROM \"polish_open\" WHERE \"womens_singles\"='Fan Ying';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who won the mens singles when lau sui fei won the womens singles?" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"polish_open\" WHERE \"womens_singles\"='Lau Sui Fei';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who won the mens doubles when wang hao won the mens singles?" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"polish_open\" WHERE \"mens_singles\"='Wang Hao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who won in the men singles group in the year when Yoshie Takada won in the women singles?" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"english_open\" WHERE \"womens_singles\"='Yoshie Takada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: When and where did Chen Qi win in men singles?" }, { "role": "assistant", "content": "SELECT \"year_location\" FROM \"english_open\" WHERE \"mens_singles\"='Chen Qi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28138035_27\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who is listed under mens singles when womens has wang nan zhang yining?" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"table1_28138035_27\" WHERE \"womens_doubles\"='Wang Nan Zhang Yining';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28138035_27\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many womens singles entries are there when womens doubles is li xiaodan wen jia?" }, { "role": "assistant", "content": "SELECT COUNT(\"womens_singles\") FROM \"table1_28138035_27\" WHERE \"womens_doubles\"='Li Xiaodan Wen Jia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28138035_27\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who is listed under womens singles when year location is 1998 doha?" }, { "role": "assistant", "content": "SELECT \"womens_singles\" FROM \"table1_28138035_27\" WHERE \"year_location\"='1998 Doha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28138035_27\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who is listed under mens singles when the year location is 2009 doha?" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"table1_28138035_27\" WHERE \"year_location\"='2009 Doha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"japan_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many year locations are there for the womens doubles in jing junhong li jiawei?" }, { "role": "assistant", "content": "SELECT COUNT(\"year_location\") FROM \"japan_open\" WHERE \"womens_doubles\"='Jing Junhong Li Jiawei';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"japan_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many players are there for mens singles when chen qi ma lin played mens doubles?" }, { "role": "assistant", "content": "SELECT COUNT(\"mens_singles\") FROM \"japan_open\" WHERE \"mens_doubles\"='Chen Qi Ma Lin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"japan_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who played mens doubles for the 1999 kobe tour?" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"japan_open\" WHERE \"year_location\"='1999 Kobe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"japan_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Where was the tour when jing junhong li jiawei played womens doubles?" }, { "role": "assistant", "content": "SELECT \"year_location\" FROM \"japan_open\" WHERE \"womens_doubles\"='Jing Junhong Li Jiawei';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"japan_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many years did lin gaoyuan wu jiaji play mens doubles?" }, { "role": "assistant", "content": "SELECT COUNT(\"year_location\") FROM \"japan_open\" WHERE \"mens_doubles\"='Lin Gaoyuan Wu Jiaji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"japan_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many people are shown for mens doubles when guo yue played womens singles?" }, { "role": "assistant", "content": "SELECT COUNT(\"mens_doubles\") FROM \"japan_open\" WHERE \"womens_singles\"='Guo Yue';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"us_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who won the Womens Singles in the year the Jean-Michel Saive won the Mens Singles?" }, { "role": "assistant", "content": "SELECT \"womens_singles\" FROM \"us_open\" WHERE \"mens_singles\"='Jean-Michel Saive';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"us_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: In what year and location did Liu Guozheng win the Mens Singles?" }, { "role": "assistant", "content": "SELECT \"year_location\" FROM \"us_open\" WHERE \"mens_singles\"='Liu Guozheng';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"us_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: In what year and location did Wang Liqin win the Mens Singles?" }, { "role": "assistant", "content": "SELECT \"year_location\" FROM \"us_open\" WHERE \"mens_singles\"='Wang Liqin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"china_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who won the mens doubles at the 2006 guangzhou event?" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"china_open\" WHERE \"year_location\"='2006 Guangzhou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"china_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many times was the womens doubles in china?" }, { "role": "assistant", "content": "SELECT COUNT(\"mens_singles\") FROM \"china_open\" WHERE \"womens_doubles\"='China';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"china_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many times did li ju win the womens singles and wang liqin win the mens singles?" }, { "role": "assistant", "content": "SELECT COUNT(\"womens_doubles\") FROM \"china_open\" WHERE \"womens_singles\"='Li Ju' AND \"mens_singles\"='Wang Liqin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Name the mens singles for lee eun-sil moon hyun-jung" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"brazil_open\" WHERE \"womens_doubles\"='Lee Eun-Sil Moon Hyun-Jung';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Name the number of womens doubles for 2011 rio de janeiro" }, { "role": "assistant", "content": "SELECT COUNT(\"womens_doubles\") FROM \"brazil_open\" WHERE \"year_location\"='2011 Rio de Janeiro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Name the year location for haruna fukuoka" }, { "role": "assistant", "content": "SELECT \"year_location\" FROM \"brazil_open\" WHERE \"womens_singles\"='Haruna Fukuoka';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Name the mens doubles for dimitrij ovtcharov" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"brazil_open\" WHERE \"mens_singles\"='Dimitrij Ovtcharov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Name the number of womens singles for 1999 rio de janeiro" }, { "role": "assistant", "content": "SELECT COUNT(\"womens_singles\") FROM \"brazil_open\" WHERE \"year_location\"='1999 Rio de Janeiro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Name the womens doubles for werner schlager" }, { "role": "assistant", "content": "SELECT \"womens_doubles\" FROM \"brazil_open\" WHERE \"mens_singles\"='Werner Schlager';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"slovenian_open\" (\n \"year_location\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who was the womens double winner when the womens singles winner was Ding Ning?" }, { "role": "assistant", "content": "SELECT \"womens_doubles\" FROM \"slovenian_open\" WHERE \"womens_singles\"='Ding Ning';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28140578_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote episode number 19 in the series?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_28140578_1\" WHERE \"no_in_series\"=19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_statistics\" (\n \"year\" real,\n \"team\" text,\n \"number\" real,\n \"games\" real,\n \"kicks\" real,\n \"handballs\" real,\n \"total_disposals\" real,\n \"marks\" real,\n \"tackles\" real,\n \"goals\" real,\n \"behinds\" real,\n \"goal_accuracy_pct\" text,\n \"brownlow_medal_votes\" real\n);\n\nQuestion: How many marks are there when tackles are 3?" }, { "role": "assistant", "content": "SELECT \"marks\" FROM \"season_statistics\" WHERE \"tackles\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_statistics\" (\n \"year\" real,\n \"team\" text,\n \"number\" real,\n \"games\" real,\n \"kicks\" real,\n \"handballs\" real,\n \"total_disposals\" real,\n \"marks\" real,\n \"tackles\" real,\n \"goals\" real,\n \"behinds\" real,\n \"goal_accuracy_pct\" text,\n \"brownlow_medal_votes\" real\n);\n\nQuestion: What was the goal accuracy % when the total disposals are 481?" }, { "role": "assistant", "content": "SELECT \"goal_accuracy_pct\" FROM \"season_statistics\" WHERE \"total_disposals\"=481;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28140590_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who directed \"it's a wonderful lie\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_28140590_1\" WHERE \"title\"='\\\"It''s a Wonderful Lie\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28140590_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What date did the episode with a production code of 60072 originally air?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_28140590_1\" WHERE \"production_code\"=60072;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28146944_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"story_storyboards_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many different people directed the episode titled \"Fail Fish\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"directed_by\") FROM \"table1_28146944_2\" WHERE \"title\"='\\\"Fail Fish\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28146944_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"story_storyboards_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of people in the US watched the episode titled \"Peopleing\"?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_28146944_2\" WHERE \"title\"='\\\"Peopleing\\\"';" } ]