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 \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: what is the venue when the competition is asian games, the event is 4x400 m relay and the year is 2002?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"competition\"='asian games' AND \"event\"='4x400 m relay' AND \"year\"=2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts_and_voting\" (\n \"voting_order\" real,\n \"country\" text,\n \"spokespersons\" text,\n \"commentator\" text,\n \"broadcaster\" text\n);\n\nQuestion: During the voting order 11, when the commentator was pierre tchernia, who was the spokesperson?" }, { "role": "assistant", "content": "SELECT \"spokespersons\" FROM \"international_broadcasts_and_voting\" WHERE \"commentator\"='pierre tchernia' AND \"voting_order\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts_and_voting\" (\n \"voting_order\" real,\n \"country\" text,\n \"spokespersons\" text,\n \"commentator\" text,\n \"broadcaster\" text\n);\n\nQuestion: What was the voting order when bunny carr was the commentator?" }, { "role": "assistant", "content": "SELECT SUM(\"voting_order\") FROM \"international_broadcasts_and_voting\" WHERE \"commentator\"='bunny carr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts_and_voting\" (\n \"voting_order\" real,\n \"country\" text,\n \"spokespersons\" text,\n \"commentator\" text,\n \"broadcaster\" text\n);\n\nQuestion: Who was the commentator when the spokesperson was michael aspel?" }, { "role": "assistant", "content": "SELECT \"commentator\" FROM \"international_broadcasts_and_voting\" WHERE \"spokespersons\"='michael aspel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts_and_voting\" (\n \"voting_order\" real,\n \"country\" text,\n \"spokespersons\" text,\n \"commentator\" text,\n \"broadcaster\" text\n);\n\nQuestion: What was the voting order when the commentator was renato tagliani?" }, { "role": "assistant", "content": "SELECT \"voting_order\" FROM \"international_broadcasts_and_voting\" WHERE \"commentator\"='renato tagliani';" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Total smaller than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"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\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Silver has a Bronze larger than 1, and a Gold of 0, and a Rank smaller than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"gold\"=0 AND \"rank\"<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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Rank of 4, and a Gold smaller than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"rank\"=4 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\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Gold has a Bronze smaller than 2, and a Silver of 0, and a Rank larger than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"bronze\"<2 AND \"silver\"=0 AND \"rank\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What percentage of the 2011 population had a mother tongue language that was spoken by 45.22% of the population in 2006 (over 120)?" }, { "role": "assistant", "content": "SELECT \"percentage_2011\" FROM \"mother_tongue_language_2006_and_2011\" WHERE \"population_2006\">120 AND \"percentage_2006\"='45.22%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What is the total number of people in 2011 speaking the mother tongue language spoken by 120 in 2006?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_2011\") FROM \"mother_tongue_language_2006_and_2011\" WHERE \"population_2006\"=120;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: How many people ha Romanian as their mother tongue in 2006?" }, { "role": "assistant", "content": "SELECT MAX(\"population_2006\") FROM \"mother_tongue_language_2006_and_2011\" WHERE \"mother_tongue\"='romanian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What is the mother tongue language shared by 300 people in 2006?" }, { "role": "assistant", "content": "SELECT \"mother_tongue\" FROM \"mother_tongue_language_2006_and_2011\" WHERE \"population_2006\"=300;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What percentage of people in 2011 had a mother tongue that was shared by less than 8,085 in 2006 and less than 145 in 2011?" }, { "role": "assistant", "content": "SELECT \"percentage_2011\" FROM \"mother_tongue_language_2006_and_2011\" WHERE \"population_2006\"<'8,085' AND \"population_2011\"<145;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What's the total number of points when the English translation is Long Live Life and the draw is less than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"results\" WHERE \"english_translation\"='long live life' AND \"draw\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What's the language of Draw number 9?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"results\" WHERE \"draw\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What are the lowest points when the language is Portuguese?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"results\" WHERE \"language\"='portuguese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"summit\" text,\n \"country\" text,\n \"island\" text,\n \"col_m\" real\n);\n\nQuestion: What's the island with a summit of Haleakal\u0101?" }, { "role": "assistant", "content": "SELECT \"island\" FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"summit\"='haleakal\u0101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"summit\" text,\n \"country\" text,\n \"island\" text,\n \"col_m\" real\n);\n\nQuestion: What's the lowest Col ranked less than 6 with an Island of Moloka\u02bbi?" }, { "role": "assistant", "content": "SELECT MIN(\"col_m\") FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"island\"='island of moloka\u02bbi' AND \"rank\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"summit\" text,\n \"country\" text,\n \"island\" text,\n \"col_m\" real\n);\n\nQuestion: What's the col (m) ranked more than 4 with a summit of Kawaikini?" }, { "role": "assistant", "content": "SELECT \"col_m\" FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"rank\">4 AND \"summit\"='kawaikini';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"summit\" text,\n \"country\" text,\n \"island\" text,\n \"col_m\" real\n);\n\nQuestion: What's the rank when the col (m) is less than 33 and has a summit of Haleakal\u0101?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"col_m\"<33 AND \"summit\"='haleakal\u0101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_six_s_ultra_prominent_summit_of_the_\" (\n \"rank\" real,\n \"summit\" text,\n \"country\" text,\n \"island\" text,\n \"col_m\" real\n);\n\nQuestion: What's the summit when the rank is less than 2 and has a col (m) of 0?" }, { "role": "assistant", "content": "SELECT \"summit\" FROM \"the_six_s_ultra_prominent_summit_of_the_\" WHERE \"col_m\"=0 AND \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"games\" (\n \"edition\" text,\n \"year\" text,\n \"city\" text,\n \"country\" text,\n \"date\" text,\n \"no_of_events\" real,\n \"top_team\" text\n);\n\nQuestion: Which Year has an Edition of 41st?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"games\" WHERE \"edition\"='41st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"games\" (\n \"edition\" text,\n \"year\" text,\n \"city\" text,\n \"country\" text,\n \"date\" text,\n \"no_of_events\" real,\n \"top_team\" text\n);\n\nQuestion: How many Events have a Country of trinidad and tobago, and a Date of march 30-april 1?" }, { "role": "assistant", "content": "SELECT \"no_of_events\" FROM \"games\" WHERE \"country\"='trinidad and tobago' AND \"date\"='march 30-april 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"games\" (\n \"edition\" text,\n \"year\" text,\n \"city\" text,\n \"country\" text,\n \"date\" text,\n \"no_of_events\" real,\n \"top_team\" text\n);\n\nQuestion: Which Country has a Top Team of jam, and an Edition of 31st?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"games\" WHERE \"top_team\"='jam' AND \"edition\"='31st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles_22_19\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the outcome of the final with a partner of Brett Steven?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_titles_22_19\" WHERE \"partner\"='brett steven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles_21\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: On what type of surface was the tournament of Italy f28?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_titles_21\" WHERE \"tournament\"='italy f28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles_21\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who was the opponent in the final of the Senegal f2 tournament>" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"doubles_titles_21\" WHERE \"tournament\"='senegal f2';" } ]
[ { "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's the score on December 12, 1998?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='december 12, 1998';" } ]
[ { "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 venue when the score was 7-1?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"score\"='7-1';" } ]
[ { "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's the score of the friendly competition?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='friendly';" } ]
[ { "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's the competition that happened in Singapore?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='singapore';" } ]
[ { "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's the venue of the 1995 Southeast Asian Games?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='1995 southeast asian games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: What was the date of the inauguration in the row with an entry of lifespan in the lifespan column?" }, { "role": "assistant", "content": "SELECT \"date_of_inauguration\" FROM \"list\" WHERE \"lifespan\"='lifespan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: What was the date of death entry in the row that has a date of inauguration entry of date of inauguration?" }, { "role": "assistant", "content": "SELECT \"date_of_death\" FROM \"list\" WHERE \"date_of_inauguration\"='date of inauguration';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: What is the length of retirement for president Sharma, Shankar Shankar Dayal Sharma?" }, { "role": "assistant", "content": "SELECT \"length_of_retirement\" FROM \"list\" WHERE \"president\"='sharma, shankar shankar dayal sharma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_heat_5\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: How many draw is in a place that is less than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"results_of_heat_5\" WHERE \"place\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_heat_5\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: What percentage has a less than 5 place, and a greater than 3 draw, and \"S Teb\" as the song?" }, { "role": "assistant", "content": "SELECT \"percentage\" FROM \"results_of_heat_5\" WHERE \"place\"<5 AND \"draw\">3 AND \"song\"='\\\"s teb\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_heat_5\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: Emilya Valenti has what draw average?" }, { "role": "assistant", "content": "SELECT AVG(\"draw\") FROM \"results_of_heat_5\" WHERE \"artist\"='emilya valenti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What's the airing date of Armed Reaction \u9640\u69cd\u5e2b\u59d0 with 20 episodes in the Modern Action genre having an official website?" }, { "role": "assistant", "content": "SELECT \"airing_date\" FROM \"second_line_series\" WHERE \"official_website\"='official website' AND \"number_of_episodes\"=20 AND \"genre\"='modern action' AND \"english_title_chinese_title\"='armed reaction \u9640\u69cd\u5e2b\u59d0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What's the airing date for the show with 62 episodes?" }, { "role": "assistant", "content": "SELECT \"airing_date\" FROM \"second_line_series\" WHERE \"number_of_episodes\"=62;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What's the official website of Burning Flame \u70c8\u706b\u96c4\u5fc3 with 22 episodes?" }, { "role": "assistant", "content": "SELECT \"official_website\" FROM \"second_line_series\" WHERE \"number_of_episodes\">22 AND \"english_title_chinese_title\"='burning flame \u70c8\u706b\u96c4\u5fc3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" text,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: what is the position for the competitor that has a score more than 7" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"qualified_competitors\" WHERE \"a_score\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" text,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: what is the score for the 5th position and a score less than 7" }, { "role": "assistant", "content": "SELECT MIN(\"b_score\") FROM \"qualified_competitors\" WHERE \"position\"='5th' AND \"a_score\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" text,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: what is the total scored for the 8th position and a score more than 6.6" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"qualified_competitors\" WHERE \"position\"='8th' AND \"a_score\">6.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the Meet of the Event with a Time of 7:55.02?" }, { "role": "assistant", "content": "SELECT \"meet\" FROM \"women\" WHERE \"time\"='7:55.02';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the Location of the Event with a Time of 2:22.32?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"women\" WHERE \"time\"='2:22.32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_i\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: Which Body Width/mm has a Lead Pitch/mm smaller than 0.55, and a Body Length/mm larger than 18.4?" }, { "role": "assistant", "content": "SELECT MIN(\"body_width_mm\") FROM \"type_i\" WHERE \"lead_pitch_mm\"<0.55 AND \"body_length_mm\">18.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_i\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: Which Body Length/mm has a Lead Pitch/mm smaller than 0.5?" }, { "role": "assistant", "content": "SELECT AVG(\"body_length_mm\") FROM \"type_i\" WHERE \"lead_pitch_mm\"<0.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_i\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: How much Body Width/mm has a Body Length/mm of 18.4, and Pins of 40?" }, { "role": "assistant", "content": "SELECT COUNT(\"body_width_mm\") FROM \"type_i\" WHERE \"body_length_mm\"=18.4 AND \"pins\"='40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_i\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: Which Body Width/mm has a Lead Pitch/mm smaller than 0.55, and a Part Number of tsop48?" }, { "role": "assistant", "content": "SELECT MIN(\"body_width_mm\") FROM \"type_i\" WHERE \"lead_pitch_mm\"<0.55 AND \"part_number\"='tsop48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_i\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: Which Lead Pitch/mm has a Part Number of tsop40, and a Body Length/mm larger than 18.4?" }, { "role": "assistant", "content": "SELECT MAX(\"lead_pitch_mm\") FROM \"type_i\" WHERE \"part_number\"='tsop40' AND \"body_length_mm\">18.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"toronto_blue_jays_vs_oakland_athletics\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the least attendance when the time was 3:15?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"toronto_blue_jays_vs_oakland_athletics\" WHERE \"time\"='3:15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"toronto_blue_jays_vs_oakland_athletics\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What date was at Oakland-Alameda County Coliseum with a time of 3:40 and a game less than 5?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"toronto_blue_jays_vs_oakland_athletics\" WHERE \"game\"<5 AND \"location\"='oakland-alameda county coliseum' AND \"time\"='3:40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_city\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Gold larger than 1, and a Total larger than 11, and a Silver larger than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"by_city\" WHERE \"gold\">1 AND \"total\">11 AND \"silver\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_city\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silvers have more than 2 golds?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"by_city\" WHERE \"gold\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usa_usage_share_data_from_stat_owl_com\" (\n \"internet_explorer\" text,\n \"firefox_other_mozilla\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text\n);\n\nQuestion: What percentage of browsers were using Firefox or other Mozilla browsers during the period in which 1.93% were using Chrome?" }, { "role": "assistant", "content": "SELECT \"firefox_other_mozilla\" FROM \"usa_usage_share_data_from_stat_owl_com\" WHERE \"chrome\"='1.93%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usa_usage_share_data_from_stat_owl_com\" (\n \"internet_explorer\" text,\n \"firefox_other_mozilla\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text\n);\n\nQuestion: What percentage of browsers were using Internet Explorer during the period in which 24.91% were using Chrome?" }, { "role": "assistant", "content": "SELECT \"internet_explorer\" FROM \"usa_usage_share_data_from_stat_owl_com\" WHERE \"chrome\"='24.91%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usa_usage_share_data_from_stat_owl_com\" (\n \"internet_explorer\" text,\n \"firefox_other_mozilla\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text\n);\n\nQuestion: What percentage of browsers were using Chrome during the period in which 72.03% were using Internet Explorer?" }, { "role": "assistant", "content": "SELECT \"chrome\" FROM \"usa_usage_share_data_from_stat_owl_com\" WHERE \"internet_explorer\"='72.03%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usa_usage_share_data_from_stat_owl_com\" (\n \"internet_explorer\" text,\n \"firefox_other_mozilla\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text\n);\n\nQuestion: What percentage of browsers were using Safari during the period in which 2.05% were using Chrome?" }, { "role": "assistant", "content": "SELECT \"safari\" FROM \"usa_usage_share_data_from_stat_owl_com\" WHERE \"chrome\"='2.05%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"usa_usage_share_data_from_stat_owl_com\" (\n \"internet_explorer\" text,\n \"firefox_other_mozilla\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text\n);\n\nQuestion: What percentage of browsers were using Chrome during the period in which 0.30% were using Opera and 6.77% were using Safari?" }, { "role": "assistant", "content": "SELECT \"chrome\" FROM \"usa_usage_share_data_from_stat_owl_com\" WHERE \"opera\"='0.30%' AND \"safari\"='6.77%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts\" (\n \"country\" text,\n \"tv_network_s\" text,\n \"series_premiere\" text,\n \"weekly_schedule\" text,\n \"status\" text\n);\n\nQuestion: Which TV network was located in Brazil?" }, { "role": "assistant", "content": "SELECT \"tv_network_s\" FROM \"international_broadcasts\" WHERE \"country\"='brazil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts\" (\n \"country\" text,\n \"tv_network_s\" text,\n \"series_premiere\" text,\n \"weekly_schedule\" text,\n \"status\" text\n);\n\nQuestion: What country has a series premier of unknown and mbc action as their TV network?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"international_broadcasts\" WHERE \"series_premiere\"='unknown' AND \"tv_network_s\"='mbc action';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_broadcasts\" (\n \"country\" text,\n \"tv_network_s\" text,\n \"series_premiere\" text,\n \"weekly_schedule\" text,\n \"status\" text\n);\n\nQuestion: What is the weekly schedule for the network sky italia?" }, { "role": "assistant", "content": "SELECT \"weekly_schedule\" FROM \"international_broadcasts\" WHERE \"tv_network_s\"='sky italia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals for the Nations with 6 or more Bronze medals and 18 or more Silver?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medals_table\" WHERE \"bronze\">6 AND \"silver\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals did the Soviet Union receive?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medals_table\" WHERE \"nation\"='soviet union';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What pos is John Mann Category:Articles with Hcards with the New York Athletic Club?" }, { "role": "assistant", "content": "SELECT \"pos\" FROM \"current_roster\" WHERE \"2012_club\"='new york athletic club' AND \"name\"='john mann category:articles with hcards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What's the weight when the pos is CB and is part of the New York Athletic Club?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"current_roster\" WHERE \"pos\"='cb' AND \"2012_club\"='new york athletic club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What's the name of the person in the CF Pos?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"current_roster\" WHERE \"pos\"='cf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Which league cup apps has FA as the cup apps of 5?" }, { "role": "assistant", "content": "SELECT \"league_cup_apps\" FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the lowest league goals that has fw as the position, total goals greater than 9, with league cup goals greater than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"position\"='fw' AND \"total_goals\">9 AND \"league_cup_goals\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: What is the earliest year that a team event was included at Vilamoura, Portugal?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"event\"='team' AND \"venue\"='vilamoura, portugal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: In which event before 2001 did the athlete place 16th?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"year\"<2001 AND \"result\"='16th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: In which tournament was the result 25th?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"result\"='25th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final_28_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the number of points for the song \"viva rock 'n' roll\", with more than 3 Draws?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"national_final_28_march_1992\" WHERE \"song\"='\\\"viva rock ''n'' roll\\\"' AND \"draw\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final_28_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What artist has more than 6 draws, and in a place higher than 14?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"national_final_28_march_1992\" WHERE \"draw\">6 AND \"place\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final_28_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the highest Place with more than 3 draws, for the Song \"dajana\", with less than 31 points?" }, { "role": "assistant", "content": "SELECT MAX(\"place\") FROM \"national_final_28_march_1992\" WHERE \"draw\">3 AND \"song\"='\\\"dajana\\\"' AND \"points\"<31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"institute\" text,\n \"social_democratic\" text,\n \"socialist\" text,\n \"green_communist\" text,\n \"democratic_renewal\" text,\n \"democratic_and_social_centre\" text,\n \"lead\" text\n);\n\nQuestion: What Social Democratic has a Democratic and Social Centre of 10.0% 22 seats?" }, { "role": "assistant", "content": "SELECT \"social_democratic\" FROM \"125_seats_needed_for_a_majority\" WHERE \"democratic_and_social_centre\"='10.0% 22 seats';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"institute\" text,\n \"social_democratic\" text,\n \"socialist\" text,\n \"green_communist\" text,\n \"democratic_renewal\" text,\n \"democratic_and_social_centre\" text,\n \"lead\" text\n);\n\nQuestion: What Social Democratic has the Democratic and Social Centre of 4.4% 4 seats?" }, { "role": "assistant", "content": "SELECT \"social_democratic\" FROM \"125_seats_needed_for_a_majority\" WHERE \"democratic_and_social_centre\"='4.4% 4 seats';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yearly_basis\" (\n \"year\" text,\n \"location\" text,\n \"number_of_teams\" text,\n \"player_of_the_tournament\" text,\n \"top_goalscorer_s\" text,\n \"best_goalkeeper\" text\n);\n\nQuestion: How many teams were at the 2007 details tournament where there a top goalscorer was not awarded?" }, { "role": "assistant", "content": "SELECT \"number_of_teams\" FROM \"yearly_basis\" WHERE \"top_goalscorer_s\"='not awarded' AND \"year\"='2007 details';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yearly_basis\" (\n \"year\" text,\n \"location\" text,\n \"number_of_teams\" text,\n \"player_of_the_tournament\" text,\n \"top_goalscorer_s\" text,\n \"best_goalkeeper\" text\n);\n\nQuestion: What is the location of the tournament where the best goalkeeper had 164 (8.2)?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"yearly_basis\" WHERE \"best_goalkeeper\"='164 (8.2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What section were they in when there were tier 2 in 1996?" }, { "role": "assistant", "content": "SELECT \"section\" FROM \"season_to_season\" WHERE \"level\"='tier 2' AND \"season\"=1996;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" real,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"administration\" text,\n \"position\" text\n);\n\nQuestion: What is the administration when the division was Ykk\u00f6nen (first division), and they were in the 1st position in 1996?" }, { "role": "assistant", "content": "SELECT \"administration\" FROM \"season_to_season\" WHERE \"division\"='ykk\u00f6nen (first division)' AND \"position\"='1st' AND \"season\"=1996;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"actor_actress\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"result\" text\n);\n\nQuestion: What was the film title that emma thompson was the actress nominated for best supporting actress?" }, { "role": "assistant", "content": "SELECT \"film_title_used_in_nomination\" FROM \"nominees\" WHERE \"actor_actress\"='emma thompson' AND \"category\"='best supporting actress';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"actor_actress\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"result\" text\n);\n\nQuestion: What category was al pacino nominated for in the film, glengarry glen ross?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"nominees\" WHERE \"actor_actress\"='al pacino' AND \"film_title_used_in_nomination\"='glengarry glen ross';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"actor_actress\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"result\" text\n);\n\nQuestion: What is the year when sigourney weaver was nominated for best actress?" }, { "role": "assistant", "content": "SELECT \"year_ceremony\" FROM \"nominees\" WHERE \"category\"='best actress' AND \"actor_actress\"='sigourney weaver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominees\" (\n \"year_ceremony\" text,\n \"actor_actress\" text,\n \"category\" text,\n \"film_title_used_in_nomination\" text,\n \"result\" text\n);\n\nQuestion: What year was holly hunter a nominee?" }, { "role": "assistant", "content": "SELECT \"year_ceremony\" FROM \"nominees\" WHERE \"result\"='nominee' AND \"actor_actress\"='holly hunter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_carolina_counties_ranked_by_per_ca\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the per capita income of the county with a median family income of $40,492?" }, { "role": "assistant", "content": "SELECT \"per_capita_income\" FROM \"south_carolina_counties_ranked_by_per_ca\" WHERE \"median_family_income\"='$40,492';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"screen_actors_guild\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: what is the earliest year when the result is won and the role/episode is fox mulder?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"screen_actors_guild\" WHERE \"result\"='won' AND \"role_episode\"='fox mulder';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"screen_actors_guild\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: what is the year when the role/episode is david duchovny?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"screen_actors_guild\" WHERE \"role_episode\"='david duchovny';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What date has 9 as the week?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the average total of the 0-8 tally?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"single_game\" WHERE \"tally\"='0-8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the total rank of the match with tipperary as the opposition?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"single_game\" WHERE \"opposition\"='tipperary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the lowest total of player tommy ring, who has a rank greater than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"single_game\" WHERE \"player\"='tommy ring' AND \"rank\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the average rank of the match where offaly was the opposition and the total was greater than 9?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"single_game\" WHERE \"opposition\"='offaly' AND \"total\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: Which municipality has a party of Lega Friuli-VG that won elections before 2011?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"municipalities\" WHERE \"party\"='lega friuli-vg' AND \"election\"<2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: Which party is Ettore Romoli from?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"municipalities\" WHERE \"mayor\"='ettore romoli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campuses\" (\n \"campus\" text,\n \"executive_director\" text,\n \"founded\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: What campus is in Brgy. Alangilan, Batangas City?" }, { "role": "assistant", "content": "SELECT \"campus\" FROM \"campuses\" WHERE \"location\"='brgy. alangilan, batangas city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campuses\" (\n \"campus\" text,\n \"executive_director\" text,\n \"founded\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: When was the Balayan, Batangas campus founded?" }, { "role": "assistant", "content": "SELECT \"founded\" FROM \"campuses\" WHERE \"location\"='balayan, batangas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campuses\" (\n \"campus\" text,\n \"executive_director\" text,\n \"founded\" real,\n \"type\" text,\n \"location\" text\n);\n\nQuestion: Who is the executive director of the Lemery, Batangas extension?" }, { "role": "assistant", "content": "SELECT \"executive_director\" FROM \"campuses\" WHERE \"type\"='extension' AND \"location\"='lemery, batangas';" } ]