chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Collingwood's score when they played against North Melbourne at home?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score at Melbourne's away match?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in attendance at Hawthorn's home match?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_8\" WHERE \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_voivodeships_1919_1939\" (\n \"car_plates_since_1937\" text,\n \"voivodeship_separate_city\" text,\n \"capital\" text,\n \"area_in_1000km_1930\" text,\n \"population_in_1000_1931\" text\n);\n\nQuestion: what is the capital with the Voivodeship Separate city of bia\u0142ostockie?" }, { "role": "assistant", "content": "SELECT \"capital\" FROM \"polish_voivodeships_1919_1939\" WHERE \"voivodeship_separate_city\"='bia\u0142ostockie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_voivodeships_1919_1939\" (\n \"car_plates_since_1937\" text,\n \"voivodeship_separate_city\" text,\n \"capital\" text,\n \"area_in_1000km_1930\" text,\n \"population_in_1000_1931\" text\n);\n\nQuestion: between car plates of 80-84 what is the population in 1000 in year 1931?" }, { "role": "assistant", "content": "SELECT \"population_in_1000_1931\" FROM \"polish_voivodeships_1919_1939\" WHERE \"car_plates_since_1937\"='80-84';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_voivodeships_1919_1939\" (\n \"car_plates_since_1937\" text,\n \"voivodeship_separate_city\" text,\n \"capital\" text,\n \"area_in_1000km_1930\" text,\n \"population_in_1000_1931\" text\n);\n\nQuestion: tell me the population in 1000(1931) that has car plates since 1937 of 35-39." }, { "role": "assistant", "content": "SELECT \"population_in_1000_1931\" FROM \"polish_voivodeships_1919_1939\" WHERE \"car_plates_since_1937\"='35-39';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polish_voivodeships_1919_1939\" (\n \"car_plates_since_1937\" text,\n \"voivodeship_separate_city\" text,\n \"capital\" text,\n \"area_in_1000km_1930\" text,\n \"population_in_1000_1931\" text\n);\n\nQuestion: tell me the name of the capital with an area of 20,4." }, { "role": "assistant", "content": "SELECT \"capital\" FROM \"polish_voivodeships_1919_1939\" WHERE \"area_in_1000km_1930\"='20,4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_tries\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: When did they play against Wales?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_tries\" WHERE \"opponent\"='wales';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_tries\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result on 29/09/07?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_tries\" WHERE \"date\"='29/09/07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_tries\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the competition on 25/08/07?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_tries\" WHERE \"date\"='25/08/07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2\" (\n \"pos\" real,\n \"driver\" text,\n \"time\" text,\n \"best_time\" text,\n \"points\" real\n);\n\nQuestion: What position is associated with a Time of 20:39.171?" }, { "role": "assistant", "content": "SELECT AVG(\"pos\") FROM \"race_2\" WHERE \"time\"='20:39.171';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2\" (\n \"pos\" real,\n \"driver\" text,\n \"time\" text,\n \"best_time\" text,\n \"points\" real\n);\n\nQuestion: How many points associated with a Best time of 01:46.367?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"race_2\" WHERE \"best_time\"='01:46.367';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the total reg gp of Ilya Krikunov, who has a round of 7 and a pick number larger than 223?" }, { "role": "assistant", "content": "SELECT COUNT(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\"=7 AND \"player\"='ilya krikunov' AND \"pick_num\">223;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the total PI GP of the player with a pick number 49 and a reg gp less than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pick_num\"=49 AND \"reg_gp\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the pick # of the player with a PI GP less than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pl_gp\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the reg gp of the player with a round number less than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the average PI GP of the player from round 5 with a pick # larger than 151?" }, { "role": "assistant", "content": "SELECT AVG(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\"=5 AND \"pick_num\">151;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"5801_5900\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: What constellation has a Declination ( J2000 ) of \u00b032\u203239\u2033?" }, { "role": "assistant", "content": "SELECT \"constellation\" FROM \"5801_5900\" WHERE \"declination_j2000\"='\u00b032\u203239\u2033';" } ]
[ { "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 \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: What is the lowest pick from Elitserien (Sweden)?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_five\" WHERE \"league_from\"='elitserien (sweden)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game played when the home team scored 10.12 (72)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"home_team_score\"='10.12 (72)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many spectators were at the game where Richmond was the away team?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_7\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_nadu_government_allopathic_western\" (\n \"college_name\" text,\n \"location\" text,\n \"district\" text,\n \"affiliation\" text,\n \"estd\" text\n);\n\nQuestion: What is the location of the kanyakumari government medical college?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tamil_nadu_government_allopathic_western\" WHERE \"college_name\"='kanyakumari government medical college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_nadu_government_allopathic_western\" (\n \"college_name\" text,\n \"location\" text,\n \"district\" text,\n \"affiliation\" text,\n \"estd\" text\n);\n\nQuestion: Where is the coimbatore affilation that was established in 1982?" }, { "role": "assistant", "content": "SELECT \"affiliation\" FROM \"tamil_nadu_government_allopathic_western\" WHERE \"estd\"='1982' AND \"location\"='coimbatore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_nadu_government_allopathic_western\" (\n \"college_name\" text,\n \"location\" text,\n \"district\" text,\n \"affiliation\" text,\n \"estd\" text\n);\n\nQuestion: What is the location of the salem district?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tamil_nadu_government_allopathic_western\" WHERE \"district\"='salem district';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_nadu_government_allopathic_western\" (\n \"college_name\" text,\n \"location\" text,\n \"district\" text,\n \"affiliation\" text,\n \"estd\" text\n);\n\nQuestion: What is the location of the tiruchirappalli district?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tamil_nadu_government_allopathic_western\" WHERE \"district\"='tiruchirappalli district';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_nadu_government_allopathic_western\" (\n \"college_name\" text,\n \"location\" text,\n \"district\" text,\n \"affiliation\" text,\n \"estd\" text\n);\n\nQuestion: What is the district where the thanjavur medical college is located?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"tamil_nadu_government_allopathic_western\" WHERE \"college_name\"='thanjavur medical college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tamil_nadu_government_allopathic_western\" (\n \"college_name\" text,\n \"location\" text,\n \"district\" text,\n \"affiliation\" text,\n \"estd\" text\n);\n\nQuestion: Where is the location of the coimbatore medical college?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tamil_nadu_government_allopathic_western\" WHERE \"college_name\"='coimbatore medical college';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Time/Retired when the grid is larger than 9 and Rolf Stommelen is the driver?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\">9 AND \"driver\"='rolf stommelen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest number of laps when the Time/Retired is differential?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"time_retired\"='differential';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who is the driver when the laps are smaller than 14, the grid is smaller than 16, and the Time/retired is not classified?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"<14 AND \"grid\"<16 AND \"time_retired\"='not classified';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid when the laps are smaller than 14 and Reine Wisell is the driver?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"laps\"<14 AND \"driver\"='reine wisell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the entrant with a driver Damon Hill and a Renault RS8 3.0 V10 engine?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"teams_and_drivers\" WHERE \"engine\"='renault rs8 3.0 v10' AND \"driver\"='damon hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the constructor of the car with a Peugeot A12 EV5 3.0 V10 engine that competed in all rounds?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"teams_and_drivers\" WHERE \"rounds\"='all' AND \"engine\"='peugeot a12 ev5 3.0 v10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What kind of engine is in the car for Scuderia Ferrari that went all rounds?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"rounds\"='all' AND \"entrant\"='scuderia ferrari';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the constructor of the 196 chassis?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"teams_and_drivers\" WHERE \"chassis\"='196';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the home with visitor of kings" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"december\" WHERE \"visitor\"='kings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the total number of attendance when the cavaliers visited" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"december\" WHERE \"visitor\"='cavaliers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which women's doubles had the accompanying Men's singles player Ville L\u00e5ng?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"21st_century\" WHERE \"men_s_singles\"='ville l\u00e5ng';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which mixed doubles was featured in 2006?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"21st_century\" WHERE \"year\"=2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which women's doubles had the men's singles player Kenichi Tago?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"21st_century\" WHERE \"men_s_singles\"='kenichi tago';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In the games at corio oval, what was the highest crowd?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_17\" WHERE \"venue\"='corio oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In the match as corio oval, who was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"venue\"='corio oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_list\" (\n \"dep\" text,\n \"chief_town\" text,\n \"arrondissement\" text,\n \"population_1999\" text,\n \"area_square_km\" real,\n \"pop_density\" real,\n \"cantons\" real,\n \"communes\" real\n);\n\nQuestion: How many communes associated with over 10 cantons and an area (Square km) of 1,589?" }, { "role": "assistant", "content": "SELECT AVG(\"communes\") FROM \"complete_list\" WHERE \"cantons\">10 AND \"area_square_km\"='1,589';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which team won the game on January 12?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"january\" WHERE \"date\"='january 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team against Geelong?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance when the VFL played MCG?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_13\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"casualties\" (\n \"year\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"civilians\" text,\n \"total\" text\n);\n\nQuestion: Name the security forces with civilians of 67" }, { "role": "assistant", "content": "SELECT \"security_forces\" FROM \"casualties\" WHERE \"civilians\"='67';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"casualties\" (\n \"year\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"civilians\" text,\n \"total\" text\n);\n\nQuestion: Name the insurgents for civilians being 49" }, { "role": "assistant", "content": "SELECT \"insurgents\" FROM \"casualties\" WHERE \"civilians\"='49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"casualties\" (\n \"year\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"civilians\" text,\n \"total\" text\n);\n\nQuestion: Name the security forces with civilians being 67" }, { "role": "assistant", "content": "SELECT \"security_forces\" FROM \"casualties\" WHERE \"civilians\"='67';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"casualties\" (\n \"year\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"civilians\" text,\n \"total\" text\n);\n\nQuestion: Name the security forces for 2009" }, { "role": "assistant", "content": "SELECT \"security_forces\" FROM \"casualties\" WHERE \"year\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"casualties\" (\n \"year\" text,\n \"security_forces\" text,\n \"insurgents\" text,\n \"civilians\" text,\n \"total\" text\n);\n\nQuestion: Tell me the security forces for 849 total" }, { "role": "assistant", "content": "SELECT \"security_forces\" FROM \"casualties\" WHERE \"total\"='849';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What tyre has a chassis of p57 p61?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"teams_and_drivers\" WHERE \"chassis\"='p57 p61';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the highest laps when the grid is 1?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"grid\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"athlete\" text,\n \"shooting_score_pts\" text,\n \"fencing_victories_pts\" text,\n \"swimming_time_pts\" text,\n \"riding_penalties_pts\" text,\n \"running_time_pts\" text,\n \"total\" real\n);\n\nQuestion: How many athletes had a Swimming Time (pts) of 2:20.93 (1232)?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"results\" WHERE \"swimming_time_pts\"='2:20.93 (1232)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"athlete\" text,\n \"shooting_score_pts\" text,\n \"fencing_victories_pts\" text,\n \"swimming_time_pts\" text,\n \"riding_penalties_pts\" text,\n \"running_time_pts\" text,\n \"total\" real\n);\n\nQuestion: What is the riding penaltie (pts) for the athlete that has a Swimming Time (pts) of 2:18.16 (1264)?" }, { "role": "assistant", "content": "SELECT \"riding_penalties_pts\" FROM \"results\" WHERE \"swimming_time_pts\"='2:18.16 (1264)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: Which owner has a description of Mark 1 pos and is dated 1956?" }, { "role": "assistant", "content": "SELECT \"owner_s\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"=1956 AND \"description\"='mark 1 pos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: Which owner has a description of Mark 1 CK and is dated 1953?" }, { "role": "assistant", "content": "SELECT \"owner_s\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"=1953 AND \"description\"='mark 1 ck';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_classification\" (\n \"name_athlete\" text,\n \"final\" text,\n \"lane\" real,\n \"semi\" text,\n \"heat\" text\n);\n\nQuestion: Who was the athlete who had SEMI of 1:43.79?" }, { "role": "assistant", "content": "SELECT \"name_athlete\" FROM \"final_classification\" WHERE \"semi\"='1:43.79';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_classification\" (\n \"name_athlete\" text,\n \"final\" text,\n \"lane\" real,\n \"semi\" text,\n \"heat\" text\n);\n\nQuestion: What were the final time for the swimmer on lane 4?" }, { "role": "assistant", "content": "SELECT \"final\" FROM \"final_classification\" WHERE \"lane\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the final score of the game at lambeau field?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"2007\" WHERE \"stadium\"='lambeau field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"unsuccessful_candidates\" (\n \"rank\" real,\n \"list\" text,\n \"candidate_name\" text,\n \"gender\" text,\n \"religion\" text,\n \"votes\" real\n);\n\nQuestion: What rank is aliyya qadi with less than 1421 votes?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"unsuccessful_candidates\" WHERE \"candidate_name\"='aliyya qadi' AND \"votes\"<1421;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"unsuccessful_candidates\" (\n \"rank\" real,\n \"list\" text,\n \"candidate_name\" text,\n \"gender\" text,\n \"religion\" text,\n \"votes\" real\n);\n\nQuestion: Which candidate has more than 279 votes, rank less than 50, is \u2640 and al-ahd?" }, { "role": "assistant", "content": "SELECT \"candidate_name\" FROM \"unsuccessful_candidates\" WHERE \"votes\">279 AND \"rank\"<50 AND \"gender\"='\u2640' AND \"list\"='al-ahd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is the first year that the Favorite Male Replacement category had Ben Vereen as a nominee?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"original_broadway_production\" WHERE \"category\"='favorite male replacement' AND \"nominee\"='ben vereen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year was Kristin Chenoweth nominated in the category of outstanding actress in a musical?" }, { "role": "assistant", "content": "SELECT \"award_ceremony\" FROM \"original_broadway_production\" WHERE \"category\"='outstanding actress in a musical' AND \"nominee\"='kristin chenoweth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year was Aaron Tveit nominated in the Favorite Male Replacement category?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"original_broadway_production\" WHERE \"result\"='nominated' AND \"category\"='favorite male replacement' AND \"nominee\"='aaron tveit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date an away ream scored 6.16 (52)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_17\" WHERE \"away_team_score\"='6.16 (52)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team that played when the home team scored 10.17 (77)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"home_team_score\"='10.17 (77)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: Tell me the sum of rank for placings of 58" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"pairs\" WHERE \"placings\"=58;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: Tell me the lowest placings for United Kingdom and rank less than 13" }, { "role": "assistant", "content": "SELECT MIN(\"placings\") FROM \"pairs\" WHERE \"nation\"='united kingdom' AND \"rank\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"points\" real,\n \"placings\" real\n);\n\nQuestion: I want to know the highest rank with placings more than 123 and points greater than 88.06" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"pairs\" WHERE \"placings\">123 AND \"points\">88.06;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the drive for an Entrant of Scuderia Ambrosiana?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"entrant\"='scuderia ambrosiana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which of the Rounds has an Entrant of automobiles Talbot-Darracq, and Pierre Levegh as the driver?" }, { "role": "assistant", "content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"entrant\"='automobiles talbot-darracq' AND \"driver\"='pierre levegh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the driver for the Entract of Enrico Plat\u00e9?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"entrant\"='enrico plat\u00e9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which of the entrants had Luigi Fagioli as a driver?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"teams_and_drivers\" WHERE \"driver\"='luigi fagioli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the driver whose Constructor was Era, and whose entrant was T.A.S.O. Mathieson?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"constructor\"='era' AND \"entrant\"='t.a.s.o. mathieson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which chassis had Rounds of 7, and an Entrant of Ecurie Rosier?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"rounds\"='7' AND \"entrant\"='ecurie rosier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Who is the winner constructor with driver riccardo patrese?" }, { "role": "assistant", "content": "SELECT \"winning_constructor\" FROM \"grands_prix\" WHERE \"winning_driver\"='riccardo patrese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the highest round on 5 april?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"grands_prix\" WHERE \"date\"='5 april';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which date was hermanos rodr\u00edguez the location?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"grands_prix\" WHERE \"location\"='hermanos rodr\u00edguez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the record for may 3" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the total number in attendance for may 1" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='may 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the loss on may 29" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='may 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many cuts were made when there weren't any wins but had a top-5 of 1 and a top 10 larger than 4?" }, { "role": "assistant", "content": "SELECT SUM(\"cuts_made\") FROM \"summary\" WHERE \"wins\"<1 AND \"top_5\"=1 AND \"top_10\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Which college has a Player of shabazz muhammad?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"2012_boys_team\" WHERE \"player\"='shabazz muhammad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: How tall is nerlens noel?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"2012_boys_team\" WHERE \"player\"='nerlens noel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Who is from flower mound, tx?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2012_boys_team\" WHERE \"hometown\"='flower mound, tx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Where is shabazz muhammad from?" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"2012_boys_team\" WHERE \"player\"='shabazz muhammad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the opponent for july 21?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='july 21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record on july 24?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='july 24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed the car with a grid under 15, 77 laps, and a Time/Retired of + 0.771?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"<15 AND \"laps\"=77 AND \"time_retired\"='+ 0.771';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid for damon hill with over 74 laps?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"race\" WHERE \"laps\">74 AND \"driver\"='damon hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"team\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which position has a School/club team of jacksonville?" }, { "role": "assistant", "content": "SELECT \"pos\" FROM \"draft\" WHERE \"school_club_team\"='jacksonville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"team\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many rounds have a Pick of 13?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"draft\" WHERE \"pick\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"team\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many rounds have School/club team of pan american?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"draft\" WHERE \"school_club_team\"='pan american';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What is the earliest year a chassis of ferrari 312t and results of 31 points occurred?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='ferrari 312t' AND \"points\"='31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What is the chassis when there is 25 points?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\"='25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: How many points were there before 1979 with a ferrari 312b2 chassis?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1979 AND \"chassis\"='ferrari 312b2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What year were there 29 (32) points?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\"='29 (32)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_middlesbrough_f_c_season\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What result occurs when the round is 4 leg 2?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"2004_05_middlesbrough_f_c_season\" WHERE \"round\"='4 leg 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_middlesbrough_f_c_season\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result for the round of 4 leg 2 when the attendance was less than 20,371?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"2004_05_middlesbrough_f_c_season\" WHERE \"attendance\">'20,371' AND \"round\"='4 leg 2';" } ]