chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result on February 18, 2003?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='february 18, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_of_the_class\" (\n \"name\" text,\n \"original_name\" text,\n \"commissioned\" text,\n \"final_decommission\" text,\n \"fate\" text\n);\n\nQuestion: When was the ship that had a fate of 'converted to laker, 1961; still in service' commissioned?" }, { "role": "assistant", "content": "SELECT \"commissioned\" FROM \"ships_of_the_class\" WHERE \"fate\"='converted to laker, 1961; still in service';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_of_the_class\" (\n \"name\" text,\n \"original_name\" text,\n \"commissioned\" text,\n \"final_decommission\" text,\n \"fate\" text\n);\n\nQuestion: When was the ship originally named sachem finally decommissioned?" }, { "role": "assistant", "content": "SELECT \"final_decommission\" FROM \"ships_of_the_class\" WHERE \"original_name\"='sachem';" } ]
[ { "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: When did the home team score 12.18 (90)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_13\" WHERE \"home_team_score\"='12.18 (90)';" } ]
[ { "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 did the away team score in the game against Richmond?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ireland_cricket_captains\" (\n \"player\" text,\n \"dates_of_captaincy\" text,\n \"lost\" real,\n \"tied\" real,\n \"no_result\" real,\n \"pct_win_a\" real\n);\n\nQuestion: Which player has no 0 results and multiples ties?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"list_of_ireland_cricket_captains\" WHERE \"no_result\"=0 AND \"tied\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ireland_cricket_captains\" (\n \"player\" text,\n \"dates_of_captaincy\" text,\n \"lost\" real,\n \"tied\" real,\n \"no_result\" real,\n \"pct_win_a\" real\n);\n\nQuestion: What is the low no result with more than 5 loss and a win ration lesser than 58.06?" }, { "role": "assistant", "content": "SELECT MIN(\"no_result\") FROM \"list_of_ireland_cricket_captains\" WHERE \"lost\">5 AND \"pct_win_a\"<58.06;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_20\" (\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: Which Crowd has an Away team score of 17.8 (110)?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_20\" WHERE \"away_team_score\"='17.8 (110)';" } ]
[ { "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\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent for may 12" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='may 12';" } ]
[ { "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\" text,\n \"record\" text\n);\n\nQuestion: Name the date for Loss of schilling (5\u20132)" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='schilling (5\u20132)';" } ]
[ { "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\" text,\n \"record\" text\n);\n\nQuestion: Name the record for may 31" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What was the highest average for the contestant having an interview score of 8.46?" }, { "role": "assistant", "content": "SELECT MAX(\"average\") FROM \"preliminary_competition\" WHERE \"interview\"=8.46;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar\" (\n \"record\" text,\n \"year\" text,\n \"date\" text,\n \"driver\" text,\n \"car_make\" text,\n \"time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What day had a time of 29.816?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"nascar\" WHERE \"time\"='29.816';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar\" (\n \"record\" text,\n \"year\" text,\n \"date\" text,\n \"driver\" text,\n \"car_make\" text,\n \"time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What kind of car has the NASCAR Camping World Truck Series record?" }, { "role": "assistant", "content": "SELECT \"car_make\" FROM \"nascar\" WHERE \"record\"='nascar camping world truck series';" } ]
[ { "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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Was it a home game on the date of April 6?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"game_log\" WHERE \"date\"='april 6';" } ]
[ { "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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date when the home team was Dallas?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"home\"='dallas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Rhett Mclane's highest pick number?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"round_two\" WHERE \"player\"='rhett mclane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Colorado College's lowest pick number?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_two\" WHERE \"college\"='colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player belongs to Northwestern College?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_two\" WHERE \"college\"='northwestern';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What CFL Team is Pascal Masson on?" }, { "role": "assistant", "content": "SELECT \"cfl_team\" FROM \"round_two\" WHERE \"player\"='pascal masson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"operational\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What's the number & name for the date after 1954?" }, { "role": "assistant", "content": "SELECT \"number_name\" FROM \"operational\" WHERE \"date\">1954;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"operational\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What's the date for princess royal class locomotive trust?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"operational\" WHERE \"owner_s\"='princess royal class locomotive trust';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"operational\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What's the number & name for the description peckett 0-4-0st?" }, { "role": "assistant", "content": "SELECT \"number_name\" FROM \"operational\" WHERE \"description\"='peckett 0-4-0st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"operational\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What's the number & name for a description of lms fowler class 3f 0-6-0t?" }, { "role": "assistant", "content": "SELECT \"number_name\" FROM \"operational\" WHERE \"description\"='lms fowler class 3f 0-6-0t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s_packers_12_8\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"attendance\" real,\n \"location\" text\n);\n\nQuestion: When did the green bay packers win at green bay with an attendance over 70,920?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2000s_packers_12_8\" WHERE \"location\"='green bay' AND \"winner\"='green bay packers' AND \"attendance\">'70,920';" } ]
[ { "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 drive 74 laps in a grid larger than 9?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"=74 AND \"grid\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Who is the player for St. Mary's team?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"r\" WHERE \"school_club_team_country\"='st. mary''s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: How tall is the player from Mississippi" }, { "role": "assistant", "content": "SELECT \"height_in_ft\" FROM \"r\" WHERE \"school_club_team_country\"='mississippi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What is the player number for the player from Centenary?" }, { "role": "assistant", "content": "SELECT \"no_s\" FROM \"r\" WHERE \"school_club_team_country\"='centenary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: How tall is player 42 from Long Beach State?" }, { "role": "assistant", "content": "SELECT \"height_in_ft\" FROM \"r\" WHERE \"no_s\"='42' AND \"school_club_team_country\"='long beach state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"early_cbs_and_abc_s_era_1959_1978\" (\n \"year\" real,\n \"network\" text,\n \"lap_by_lap\" text,\n \"pit_reporters\" text,\n \"host\" text\n);\n\nQuestion: What network has lap-by-laps by Bill Flemming, and Pit reporter Chris Economaki?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"early_cbs_and_abc_s_era_1959_1978\" WHERE \"lap_by_lap\"='bill flemming' AND \"pit_reporters\"='chris economaki';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"early_cbs_and_abc_s_era_1959_1978\" (\n \"year\" real,\n \"network\" text,\n \"lap_by_lap\" text,\n \"pit_reporters\" text,\n \"host\" text\n);\n\nQuestion: Which lap-by-lap has a year after 1973, with pit reporter Bill Flemming?" }, { "role": "assistant", "content": "SELECT \"lap_by_lap\" FROM \"early_cbs_and_abc_s_era_1959_1978\" WHERE \"year\">1973 AND \"pit_reporters\"='bill flemming';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 9:00 when at 10:00 it is local programming and at 8:30 it is decision house (reruns)?" }, { "role": "assistant", "content": "SELECT \"9_00\" FROM \"monday\" WHERE \"10_00\"='local programming' AND \"8_30\"='decision house (reruns)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on at 8:00 when at 8:30 it is the bachelorette?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"monday\" WHERE \"8_30\"='the bachelorette';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: what is on a 8:30 when at 9:00 it is one tree hill (reruns)?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"monday\" WHERE \"9_00\"='one tree hill (reruns)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is at 8:30 when at 9:30 it is rules of engagement (reruns)?" }, { "role": "assistant", "content": "SELECT \"8_30\" FROM \"monday\" WHERE \"9_30\"='rules of engagement (reruns)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the lowest round for Fort Lauderdale, Florida, United States, with a win and a time of 3:38?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"location\"='fort lauderdale, florida, united states' AND \"time\"='3:38';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: How many rounds have a time of 2:18?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"time\"='2:18';" } ]
[ { "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 lowest Grid with fewer than 65 Laps and with Driver Tim Schenken?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"laps\"<65 AND \"driver\"='tim schenken';" } ]
[ { "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 Driver has 1 in Grid?" }, { "role": "assistant", "content": "SELECT \"driver\" 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 \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is Driver Howden Ganley's Time/Retired?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='howden ganley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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: On what date was Hawthorn the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_18\" 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 \"round_18\" (\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: Which home team opposed an away team with a score of 16.22 (118)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"away_team_score\"='16.22 (118)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 away team at Junction Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\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: Which home team played at MCG?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Tell me the sum of draws for position less than 15 with played more than 38" }, { "role": "assistant", "content": "SELECT SUM(\"draws\") FROM \"final_table\" WHERE \"position\"<15 AND \"played\">38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the sum of played for position less than 9 and draws more than 19 with goals against more than 27" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"final_table\" WHERE \"position\"<9 AND \"draws\">19 AND \"goals_against\">27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Name the recorded for translation of sleep my love, good night" }, { "role": "assistant", "content": "SELECT \"recorded\" FROM \"track_listing\" WHERE \"translation\"='sleep my love, good night';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"olympic_host_cities\" (\n \"city\" text,\n \"country\" text,\n \"continent\" text,\n \"summer\" text,\n \"winter\" text,\n \"season\" text,\n \"year\" real\n);\n\nQuestion: What is the Winter in 1906?" }, { "role": "assistant", "content": "SELECT \"winter\" FROM \"olympic_host_cities\" WHERE \"year\"=1906;" } ]
[ { "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: Which driver has a Time/Retired of 2:45:46.2?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='2:45:46.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position for the western michigan product picked ahead of 312?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\"<312 AND \"school_club_team\"='western michigan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1950s_bears_14_5_1\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"attendance\" real,\n \"location\" text\n);\n\nQuestion: What date did the Chicago Bears beat the Green bay Packers 31-20?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1950s_bears_14_5_1\" WHERE \"loser\"='green bay packers' AND \"location\"='green bay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When were the boston bruins the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"march\" WHERE \"home\"='boston bruins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: In what nation is Bordeaux?" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"in\" WHERE \"moving_from\"='bordeaux';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who has the lead in Norway?" }, { "role": "assistant", "content": "SELECT \"lead\" FROM \"teams\" WHERE \"nation\"='norway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Which Skip will play Joan Mccusker?" }, { "role": "assistant", "content": "SELECT \"skip\" FROM \"teams\" WHERE \"second\"='joan mccusker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the Alternate for Sweden?" }, { "role": "assistant", "content": "SELECT \"alternate\" FROM \"teams\" WHERE \"nation\"='sweden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the third alternate for Germany?" }, { "role": "assistant", "content": "SELECT \"third\" FROM \"teams\" WHERE \"nation\"='germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"title\" text,\n \"urdu\" text,\n \"translation\" text,\n \"date\" real,\n \"content\" text\n);\n\nQuestion: Which translation was published in 1986?" }, { "role": "assistant", "content": "SELECT \"translation\" FROM \"bibliography\" WHERE \"date\"=1986;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"title\" text,\n \"urdu\" text,\n \"translation\" text,\n \"date\" real,\n \"content\" text\n);\n\nQuestion: Which title has content including mysticism, spiritualism, and a translation of the minaret of light?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"bibliography\" WHERE \"content\"='mysticism, spiritualism' AND \"translation\"='the minaret of light';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"economy\" (\n \"rank\" text,\n \"name\" text,\n \"headquarters\" text,\n \"revenue_mil\" text,\n \"profit_mil\" text,\n \"employees_world\" real\n);\n\nQuestion: What is hte nuumber of employees that has a revenue of 104.000?" }, { "role": "assistant", "content": "SELECT \"employees_world\" FROM \"economy\" WHERE \"revenue_mil\"='104.000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"economy\" (\n \"rank\" text,\n \"name\" text,\n \"headquarters\" text,\n \"revenue_mil\" text,\n \"profit_mil\" text,\n \"employees_world\" real\n);\n\nQuestion: Which HQ is associated with a number of employees of 100?" }, { "role": "assistant", "content": "SELECT \"headquarters\" FROM \"economy\" WHERE \"employees_world\"=100;" } ]
[ { "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: What is the low silver medal total for nations with over 1 bronze ranked above 11?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"rank\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the high total for nations with 1 gold and over 1 bronze?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"gold\"=1 AND \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the home team with a 4-6-0 record?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"october\" WHERE \"record\"='4-6-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the decision of the game with Washington as the visitor team on October 13?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"october\" WHERE \"visitor\"='washington' AND \"date\"='october 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2001_2100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: What is the average NGC number of everything with a Right ascension (J2000) of 05h33m30s?" }, { "role": "assistant", "content": "SELECT AVG(\"ngc_number\") FROM \"2001_2100\" WHERE \"right_ascension_j2000\"='05h33m30s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2001_2100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: What is the right ascension (J2000) with a Declination (J2000) of \u00b012\u203243\u2033, is a constellation of dorado, and has an NGC number larger than 2068?" }, { "role": "assistant", "content": "SELECT \"right_ascension_j2000\" FROM \"2001_2100\" WHERE \"ngc_number\">2068 AND \"constellation\"='dorado' AND \"declination_j2000\"='\u00b012\u203243\u2033';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2001_2100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: What type of object has an NGC number higher than 2090 and has a right ascension (J2000) of 05h52m19s?" }, { "role": "assistant", "content": "SELECT \"object_type\" FROM \"2001_2100\" WHERE \"ngc_number\">2090 AND \"right_ascension_j2000\"='05h52m19s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 is the crowd of the team Geelong?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_1\" 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_1\" (\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 has the smallest crowd in the Venue of Arden Street Oval?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_1\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 team has a Venue at Lake Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"venue\"='lake oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"trans_am_series\" (\n \"year\" real,\n \"date\" text,\n \"drivers\" text,\n \"distance_duration\" text,\n \"race_title\" text\n);\n\nQuestion: What day is the grand prix de trois-rivi\u00e8res?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"trans_am_series\" WHERE \"race_title\"='grand prix de trois-rivi\u00e8res';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"trans_am_series\" (\n \"year\" real,\n \"date\" text,\n \"drivers\" text,\n \"distance_duration\" text,\n \"race_title\" text\n);\n\nQuestion: What race is on aug 4 with ron fellows?" }, { "role": "assistant", "content": "SELECT \"race_title\" FROM \"trans_am_series\" WHERE \"drivers\"='ron fellows' AND \"date\"='aug 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"trans_am_series\" (\n \"year\" real,\n \"date\" text,\n \"drivers\" text,\n \"distance_duration\" text,\n \"race_title\" text\n);\n\nQuestion: What is the distance/duration on sept 5 of le grand prix de trois-rivi\u00e8res?" }, { "role": "assistant", "content": "SELECT \"distance_duration\" FROM \"trans_am_series\" WHERE \"date\"='sept 5' AND \"race_title\"='le grand prix de trois-rivi\u00e8res';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is terry's record when he fights julio paulino?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='julio paulino';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: How long is the ko (punch) fight against scott smith?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='ko (punch)' AND \"opponent\"='scott smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"history_of_conquest\" (\n \"peak\" text,\n \"metres\" real,\n \"feet\" real,\n \"latitude_n\" text,\n \"longitude_e\" text,\n \"prominence_m\" real\n);\n\nQuestion: What is the average feet that has a Latitude (N) of 35\u00b048\u203235\u2033, and under 8,047m?" }, { "role": "assistant", "content": "SELECT AVG(\"feet\") FROM \"history_of_conquest\" WHERE \"latitude_n\"='35\u00b048\u203235\u2033' AND \"metres\"<'8,047';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"history_of_conquest\" (\n \"peak\" text,\n \"metres\" real,\n \"feet\" real,\n \"latitude_n\" text,\n \"longitude_e\" text,\n \"prominence_m\" real\n);\n\nQuestion: What is the lowest feet total with a Longitude (E) of 76\u00b034\u203206\u2033, and a Prominence (m) under 1,701?" }, { "role": "assistant", "content": "SELECT MIN(\"feet\") FROM \"history_of_conquest\" WHERE \"longitude_e\"='76\u00b034\u203206\u2033' AND \"prominence_m\"<'1,701';" } ]
[ { "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 \"nba_draft\" text\n);\n\nQuestion: What Player comes from the Hometown of Wichita, KS?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2012_boys_team\" WHERE \"hometown\"='wichita, ks';" } ]
[ { "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 \"nba_draft\" text\n);\n\nQuestion: For the Player from Brampton, ON what is their NBA Draft status?" }, { "role": "assistant", "content": "SELECT \"nba_draft\" FROM \"2012_boys_team\" WHERE \"hometown\"='brampton, on';" } ]
[ { "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 \"nba_draft\" text\n);\n\nQuestion: What was the College of Player Perry Ellis?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"2012_boys_team\" WHERE \"player\"='perry ellis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ladies\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"figures\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest figure score when the free is 556?" }, { "role": "assistant", "content": "SELECT MIN(\"figures\") FROM \"ladies\" WHERE \"free\"=556;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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: On what date did the home team score 5.8 (38)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_12\" WHERE \"home_team_score\"='5.8 (38)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 size of the crowd for the game where the away team South Melbourne played?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_12\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 home team score when the crowd was larger than 30,100?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"crowd\">'30,100';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 size of the crowd when the away team scored 6.15 (51)?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_12\" WHERE \"away_team_score\"='6.15 (51)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 much did the home team Hawthorn score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_12\" 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 \"round_5\" (\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 away team at South Melbourne with a crowd size larger than 10,000." }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"crowd\">'10,000' AND \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 did the away team score 10.11 (71)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_5\" WHERE \"away_team_score\"='10.11 (71)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 crowd size for the game at Footscray?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_5\" WHERE \"away_team\"='footscray';" } ]
[ { "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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visitor when phoenix was at home?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"home\"='phoenix';" } ]
[ { "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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What day did philadelphia visit?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='philadelphia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"soundtrack\" (\n \"track_num\" real,\n \"song\" text,\n \"singers\" text,\n \"picturization\" text,\n \"length\" text,\n \"lyricist\" text\n);\n\nQuestion: Which song has a Picturization of Vijay?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"soundtrack\" WHERE \"picturization\"='vijay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"soundtrack\" (\n \"track_num\" real,\n \"song\" text,\n \"singers\" text,\n \"picturization\" text,\n \"length\" text,\n \"lyricist\" text\n);\n\nQuestion: How long is the song \"Maduraikku Pogathadee\"?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"soundtrack\" WHERE \"song\"='\\\"maduraikku pogathadee\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_3\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the air date for the episode with production code ad1c13?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"season_3\" WHERE \"production_code\"='ad1c13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_3\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Who wrote the episode that has the production code ad1c05?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"season_3\" WHERE \"production_code\"='ad1c05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_3\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the title of the episode with production code ad1c07?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"season_3\" WHERE \"production_code\"='ad1c07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"mid_gippsland_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the low draw total for yarragon teams with over 3 wins, and under 966 against?" }, { "role": "assistant", "content": "SELECT MIN(\"draws\") FROM \"2011_ladder\" WHERE \"wins\">3 AND \"mid_gippsland_fl\"='yarragon' AND \"against\"<966;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"combination_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the General classification for a points classification leader of Bradley Wiggins?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"jersey_progress\" WHERE \"points_classification\"='bradley wiggins';" } ]