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 \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What game ended with a final score of 126-108?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"score\"='126-108';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the highest number of rebounds on February 6?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='february 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" real\n);\n\nQuestion: How many people tuned in to the finale on May 16, 2007?" }, { "role": "assistant", "content": "SELECT COUNT(\"viewers_in_millions\") FROM \"u_s_television_ratings\" WHERE \"finale\"='may 16, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" real\n);\n\nQuestion: What time did the season finale air on May 20, 2003?" }, { "role": "assistant", "content": "SELECT \"timeslot\" FROM \"u_s_television_ratings\" WHERE \"finale\"='may 20, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the total score where Toronto was played?" }, { "role": "assistant", "content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"team\"='toronto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_squad_statistics\" (\n \"player\" text,\n \"position\" text,\n \"weight_height\" text,\n \"previous_club\" text,\n \"contracted_until\" real\n);\n\nQuestion: Which Weight & Height has a Player of james donaldson?" }, { "role": "assistant", "content": "SELECT \"weight_height\" FROM \"2009_squad_statistics\" WHERE \"player\"='james donaldson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_squad_statistics\" (\n \"player\" text,\n \"position\" text,\n \"weight_height\" text,\n \"previous_club\" text,\n \"contracted_until\" real\n);\n\nQuestion: Which Weight & Height has a Player of michael worrincy?" }, { "role": "assistant", "content": "SELECT \"weight_height\" FROM \"2009_squad_statistics\" WHERE \"player\"='michael worrincy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deployments\" (\n \"from\" text,\n \"aircraft\" text,\n \"carrier\" text,\n \"air_wing\" text,\n \"tail_code\" text,\n \"area\" text\n);\n\nQuestion: What was the deployed from date for the a-4b aircraft from westpac with a tail code of ah-3xx?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"deployments\" WHERE \"tail_code\"='ah-3xx' AND \"area\"='westpac' AND \"aircraft\"='a-4b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deployments\" (\n \"from\" text,\n \"aircraft\" text,\n \"carrier\" text,\n \"air_wing\" text,\n \"tail_code\" text,\n \"area\" text\n);\n\nQuestion: Which carrier was deployed on 18 July 1968?" }, { "role": "assistant", "content": "SELECT \"carrier\" FROM \"deployments\" WHERE \"from\"='18 july 1968';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deployments\" (\n \"from\" text,\n \"aircraft\" text,\n \"carrier\" text,\n \"air_wing\" text,\n \"tail_code\" text,\n \"area\" text\n);\n\nQuestion: What is the type of aircraft that has a tail code of ah-3xx, deployed from 16 June 1967?" }, { "role": "assistant", "content": "SELECT \"aircraft\" FROM \"deployments\" WHERE \"tail_code\"='ah-3xx' AND \"from\"='16 june 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deployments\" (\n \"from\" text,\n \"aircraft\" text,\n \"carrier\" text,\n \"air_wing\" text,\n \"tail_code\" text,\n \"area\" text\n);\n\nQuestion: What was the tail code for the cva-34 carrier with an air wing of cvw-16, deployed from 16 June 1967 in the Vietnam War?" }, { "role": "assistant", "content": "SELECT \"tail_code\" FROM \"deployments\" WHERE \"carrier\"='cva-34' AND \"air_wing\"='cvw-16' AND \"area\"='vietnam war' AND \"from\"='16 june 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deployments\" (\n \"from\" text,\n \"aircraft\" text,\n \"carrier\" text,\n \"air_wing\" text,\n \"tail_code\" text,\n \"area\" text\n);\n\nQuestion: What is the air wing for the craft with a tail code of ah-3xx, deployed from 16 June 1967 in the Vietnam War?" }, { "role": "assistant", "content": "SELECT \"air_wing\" FROM \"deployments\" WHERE \"area\"='vietnam war' AND \"tail_code\"='ah-3xx' AND \"from\"='16 june 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deployments\" (\n \"from\" text,\n \"aircraft\" text,\n \"carrier\" text,\n \"air_wing\" text,\n \"tail_code\" text,\n \"area\" text\n);\n\nQuestion: What is the air wing for the craft that was deployed from 16 June 1967?" }, { "role": "assistant", "content": "SELECT \"air_wing\" FROM \"deployments\" WHERE \"from\"='16 june 1967';" } ]
[ { "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 the result of the match that went to round 1 and only for 2:48?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"time\"='2:48';" } ]
[ { "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: The K-1 MMA Romanex event went how many rounds?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"event\"='k-1 mma romanex';" } ]
[ { "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 the result for the match that was only 2:48 long?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='2:48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is Points For, when Points Against is 571?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"2007_08_table\" WHERE \"points_against\"='571';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is Drawn, when Lost is 14, and when Bonus Points is 12?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2007_08_table\" WHERE \"lost\"='14' AND \"bonus_points\"='12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is Points, when Club is Maesteg RFC?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"2007_08_table\" WHERE \"club\"='maesteg rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is Points, when Points is 60, and when Club is Bedwas RFC?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"2007_08_table\" WHERE \"points\"='60' AND \"club\"='bedwas rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is Drawn, when Club is Newport RFC?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2007_08_table\" WHERE \"club\"='newport rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_08_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is Points Difference, when Points Against is 451?" }, { "role": "assistant", "content": "SELECT \"points_difference\" FROM \"2007_08_table\" WHERE \"points_against\"='451';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which is the highest silver that has a gold less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest silver that has 1 as the rank, with a bronze greater than 5?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"rank\"=1 AND \"bronze\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest silver that has 9 as the rank, germany as the nation, with a gold less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"rank\"=9 AND \"nation\"='germany' AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What shows for the location and attendance when the record is 41\u201336?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"record\"='41\u201336';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score when the record was 40\u201336?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='40\u201336';" } ]
[ { "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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHo is the Player got a Pick # smaller than 61, and a College of texas?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"pick_num\"<61 AND \"college\"='texas';" } ]
[ { "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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the College which has a Round smaller than 3, and a Pick # larger than 4, and a Position of wide receiver?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"round\"<3 AND \"pick_num\">4 AND \"position\"='wide receiver';" } ]
[ { "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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which the highest Round has a Player of mike williams, and a Pick # larger than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"player\"='mike williams' AND \"pick_num\">4;" } ]
[ { "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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the average Pick # of mike williams?" }, { "role": "assistant", "content": "SELECT AVG(\"pick_num\") FROM \"nfl_draft\" WHERE \"player\"='mike williams';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What date did the red wings play against the visitors, buffalo?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='buffalo';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: Who made the decision when atlanta was the home team?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"game_log\" WHERE \"home\"='atlanta';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: Who made the decision when detroit was the home team and boston was the visitor?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"game_log\" WHERE \"home\"='detroit' AND \"visitor\"='boston';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: Who made the decision when toronto was the home team?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"game_log\" WHERE \"home\"='toronto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: The player Cecil Martin with an overall less than 268 has what total pick?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='cecil martin' AND \"overall\"<268;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: With the pick of 1 Cecil Martin has what number as the overall?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"pick\"=1 AND \"name\"='cecil martin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does the player play with an overall of 304?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"=304;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_and_e_ps\" (\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"code\" text,\n \"uk_singles_chart\" text,\n \"us_modern_rock\" text,\n \"album\" text\n);\n\nQuestion: What is the US modern rock rank of code bad 0003?" }, { "role": "assistant", "content": "SELECT \"us_modern_rock\" FROM \"singles_and_e_ps\" WHERE \"code\"='bad 0003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_and_e_ps\" (\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"code\" text,\n \"uk_singles_chart\" text,\n \"us_modern_rock\" text,\n \"album\" text\n);\n\nQuestion: What is the format of code 9 40231-2 (us only)?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"singles_and_e_ps\" WHERE \"code\"='9 40231-2 (us only)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_and_e_ps\" (\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"code\" text,\n \"uk_singles_chart\" text,\n \"us_modern_rock\" text,\n \"album\" text\n);\n\nQuestion: What is the UK singles chart rank of the single released on 26 February 1990?" }, { "role": "assistant", "content": "SELECT \"uk_singles_chart\" FROM \"singles_and_e_ps\" WHERE \"release_date\"='26 february 1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_and_e_ps\" (\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"code\" text,\n \"uk_singles_chart\" text,\n \"us_modern_rock\" text,\n \"album\" text\n);\n\nQuestion: What is the format of code pro-cd-4662?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"singles_and_e_ps\" WHERE \"code\"='pro-cd-4662';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mongolia\" (\n \"city\" text,\n \"mongolian\" text,\n \"mongolian_script\" text,\n \"province\" text,\n \"population_2008\" real\n);\n\nQuestion: Which city has the mongolian script of \u1821\u1837\u1833\u1821\u1828\u1822\u1832\u1826?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"mongolia\" WHERE \"mongolian_script\"='\u1821\u1837\u1833\u1821\u1828\u1822\u1832\u1826';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mongolia\" (\n \"city\" text,\n \"mongolian\" text,\n \"mongolian_script\" text,\n \"province\" text,\n \"population_2008\" real\n);\n\nQuestion: Which mongolian has the province of municipality?" }, { "role": "assistant", "content": "SELECT \"mongolian\" FROM \"mongolia\" WHERE \"province\"='municipality';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_tournament_results\" (\n \"year\" real,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"bsu_head_coach\" text\n);\n\nQuestion: What is the sum of the years with bus conner as the BSU head coach?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"ncaa_division_i_tournament_results\" WHERE \"bsu_head_coach\"='bus conner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_tournament_results\" (\n \"year\" real,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"bsu_head_coach\" text\n);\n\nQuestion: Who is the BSU head coach of the tournament after 1994 with louisville as the opponent?" }, { "role": "assistant", "content": "SELECT \"bsu_head_coach\" FROM \"ncaa_division_i_tournament_results\" WHERE \"opponent\"='louisville' AND \"year\">1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_tournament_results\" (\n \"year\" real,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"bsu_head_coach\" text\n);\n\nQuestion: What is the result in 1994?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"ncaa_division_i_tournament_results\" WHERE \"year\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_tournament_results\" (\n \"year\" real,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"bsu_head_coach\" text\n);\n\nQuestion: What is the result after 1993 of the first four rounds?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"ncaa_division_i_tournament_results\" WHERE \"year\">1993 AND \"round\"='first four';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_tournament_results\" (\n \"year\" real,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"bsu_head_coach\" text\n);\n\nQuestion: Who was the opponent before 1994 with bobby dye as the BSU head coach?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"ncaa_division_i_tournament_results\" WHERE \"bsu_head_coach\"='bobby dye' AND \"year\"<1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_tournament_results\" (\n \"year\" real,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"bsu_head_coach\" text\n);\n\nQuestion: Who is the opponent in 1976?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"ncaa_division_i_tournament_results\" WHERE \"year\"=1976;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is Date, when Score is \"0-2\", and when Opponents is \"Bayer Leverkusen\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"results\" WHERE \"score\"='0-2' AND \"opponents\"='bayer leverkusen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is Competition, when Score is \"2-1\", and when Date is \"October 22, 2008\"?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"results\" WHERE \"score\"='2-1' AND \"date\"='october 22, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is Match Report, when Venue is \"Westfalenstadion , Dortmund\"?" }, { "role": "assistant", "content": "SELECT \"match_report\" FROM \"results\" WHERE \"venue\"='westfalenstadion , dortmund';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is Date, when Venue is \"Weserstadion , Bremen\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"results\" WHERE \"venue\"='weserstadion , bremen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is Date, when Competition is \"F\", and when Opponents is \"FC Astoria Walldorf\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"results\" WHERE \"competition\"='f' AND \"opponents\"='fc astoria walldorf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick of Charley Taylor, who has an overall greater than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='charley taylor' AND \"overall\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player with a 143 overall?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"=143;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average round of the s position player from the college of Mississippi and has an overall less than 214?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='s' AND \"college\"='mississippi' AND \"overall\"<214;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total round of the rb player from Purdue with a pick less than 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='rb' AND \"college\"='purdue' AND \"pick\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: Which category has 24 nominated work?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"awards\" WHERE \"nominated_work\"='24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Silver medals did the Nation of Croatia receive with a Total medal of more than 1?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\"=1 AND \"total\">1 AND \"nation\"='croatia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals did Australia receive?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Total medals did the country with 16 Silver and less than 32 Bronze receive?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"silver\"=16 AND \"bronze\"<32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Bronze medals for the Nation with a Rank of 11 and less than 1 Silver?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='11' AND \"silver\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"writer\" (\n \"year\" real,\n \"show\" text,\n \"season\" real,\n \"episode\" text,\n \"episode_number\" real,\n \"original_airdate\" text\n);\n\nQuestion: What is the average Episode Number, when Original Airdate is March 21, 2010, and when Season is less than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"episode_number\") FROM \"writer\" WHERE \"original_airdate\"='march 21, 2010' AND \"season\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"writer\" (\n \"year\" real,\n \"show\" text,\n \"season\" real,\n \"episode\" text,\n \"episode_number\" real,\n \"original_airdate\" text\n);\n\nQuestion: What is Show, when Episode Number is 1, when Year is less than 2010, and when Original Airdate is January 20, 2008?" }, { "role": "assistant", "content": "SELECT \"show\" FROM \"writer\" WHERE \"episode_number\"=1 AND \"year\"<2010 AND \"original_airdate\"='january 20, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"writer\" (\n \"year\" real,\n \"show\" text,\n \"season\" real,\n \"episode\" text,\n \"episode_number\" real,\n \"original_airdate\" text\n);\n\nQuestion: What is the total number of Season(s), when Original Airdate is January 24, 1999, and when Year is less than 1999?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"writer\" WHERE \"original_airdate\"='january 24, 1999' AND \"year\"<1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: How many games have a Result of l, and a Record of 2-6?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"schedule\" WHERE \"result\"='l' AND \"record\"='2-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the green bay packers game?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='green bay packers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the game whose score was 1-1?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"record\"='1-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: Which Date has a Score of 24-7, and a Record of 4-10?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"score\"='24-7' AND \"record\"='4-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Lowest round for g that was smaller than 31?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='g' AND \"overall\"<31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is the Semifinalists that has a Tournament of Cincinnati?" }, { "role": "assistant", "content": "SELECT \"semifinalists\" FROM \"doubles\" WHERE \"tournament\"='cincinnati';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_competition_history\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: The Crvena Zvezda club has what aggregate?" }, { "role": "assistant", "content": "SELECT \"aggregate\" FROM \"european_competition_history\" WHERE \"club\"='crvena zvezda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points_for_the_2008_09_season\" (\n \"name\" text,\n \"pld\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real,\n \"pims\" real\n);\n\nQuestion: What is the total number of assists of the player with 0 goals, more than 1 points, and more than 0 pims?" }, { "role": "assistant", "content": "SELECT COUNT(\"assists\") FROM \"points_for_the_2008_09_season\" WHERE \"goals\"=0 AND \"points\">1 AND \"pims\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: What is league position when manchester played against luton town when 41,288 fans attended?" }, { "role": "assistant", "content": "SELECT \"league_position\" FROM \"first_division\" WHERE \"attendance\">'41,288' AND \"opponents\"='luton town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"big_ten_conference_3_10_1\" (\n \"institution\" text,\n \"wins\" real,\n \"loss\" real,\n \"home_wins\" real,\n \"home_losses\" real,\n \"away_wins\" real,\n \"away_losses\" real,\n \"neutral_wins\" real,\n \"neutral_losses\" real\n);\n\nQuestion: How many Neutral Wins have Home Losses larger than 2, and a Loss of 7, and an Away Wins larger than 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"neutral_wins\") FROM \"big_ten_conference_3_10_1\" WHERE \"home_losses\">2 AND \"loss\"=7 AND \"away_wins\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"big_ten_conference_3_10_1\" (\n \"institution\" text,\n \"wins\" real,\n \"loss\" real,\n \"home_wins\" real,\n \"home_losses\" real,\n \"away_wins\" real,\n \"away_losses\" real,\n \"neutral_wins\" real,\n \"neutral_losses\" real\n);\n\nQuestion: How many Away Losses have Home Losses larger than 3, and Wins smaller than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"away_losses\") FROM \"big_ten_conference_3_10_1\" WHERE \"home_losses\">3 AND \"wins\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"big_ten_conference_3_10_1\" (\n \"institution\" text,\n \"wins\" real,\n \"loss\" real,\n \"home_wins\" real,\n \"home_losses\" real,\n \"away_wins\" real,\n \"away_losses\" real,\n \"neutral_wins\" real,\n \"neutral_losses\" real\n);\n\nQuestion: Which Home Wins have Neutral Wins of 1, and Neutral Losses smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"home_wins\") FROM \"big_ten_conference_3_10_1\" WHERE \"neutral_wins\"=1 AND \"neutral_losses\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"big_ten_conference_3_10_1\" (\n \"institution\" text,\n \"wins\" real,\n \"loss\" real,\n \"home_wins\" real,\n \"home_losses\" real,\n \"away_wins\" real,\n \"away_losses\" real,\n \"neutral_wins\" real,\n \"neutral_losses\" real\n);\n\nQuestion: Which Wins is the lowest one that has Home Losses larger than 3, and Neutral Losses smaller than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"big_ten_conference_3_10_1\" WHERE \"home_losses\">3 AND \"neutral_losses\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"western_conference_quarter_finals_vs_6_c\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"series\" text\n);\n\nQuestion: Which Decision has a Visitor of calgary, a Score of 2 \u2013 1, and a Series of 4 \u2013 3?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"western_conference_quarter_finals_vs_6_c\" WHERE \"visitor\"='calgary' AND \"score\"='2 \u2013 1' AND \"series\"='4 \u2013 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"western_conference_quarter_finals_vs_6_c\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"series\" text\n);\n\nQuestion: Which Visitor has a Series of 2 \u2013 1?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"western_conference_quarter_finals_vs_6_c\" WHERE \"series\"='2 \u2013 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"western_conference_quarter_finals_vs_6_c\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"series\" text\n);\n\nQuestion: Which Visitor has a Home of calgary, and a Date of april 17?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"western_conference_quarter_finals_vs_6_c\" WHERE \"home\"='calgary' AND \"date\"='april 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"western_conference_quarter_finals_vs_6_c\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"series\" text\n);\n\nQuestion: Which Decision has a Visitor of vancouver, and a Score of 5 \u2013 4?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"western_conference_quarter_finals_vs_6_c\" WHERE \"visitor\"='vancouver' AND \"score\"='5 \u2013 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"western_conference_quarter_finals_vs_6_c\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"series\" text\n);\n\nQuestion: Which Visitor has a Home of vancouver, and a Decision of cloutier?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"western_conference_quarter_finals_vs_6_c\" WHERE \"home\"='vancouver' AND \"decision\"='cloutier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"western_conference_quarter_finals_vs_6_c\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"series\" text\n);\n\nQuestion: Which Decision has a Series of 3 \u2013 3?" }, { "role": "assistant", "content": "SELECT \"decision\" FROM \"western_conference_quarter_finals_vs_6_c\" WHERE \"series\"='3 \u2013 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hot_wheels_v8_supercar_showdown\" (\n \"driver\" text,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"race_4\" text\n);\n\nQuestion: What's the value for race 4 when race 1 is dsq?" }, { "role": "assistant", "content": "SELECT \"race_4\" FROM \"hot_wheels_v8_supercar_showdown\" WHERE \"race_1\"='dsq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hot_wheels_v8_supercar_showdown\" (\n \"driver\" text,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"race_4\" text\n);\n\nQuestion: What's the value for race 4 when race 3 is dns and race 2 is 27?" }, { "role": "assistant", "content": "SELECT \"race_4\" FROM \"hot_wheels_v8_supercar_showdown\" WHERE \"race_3\"='dns' AND \"race_2\"='27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hot_wheels_v8_supercar_showdown\" (\n \"driver\" text,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"race_4\" text\n);\n\nQuestion: What's the value for race 4 for driver kevin heffernan?" }, { "role": "assistant", "content": "SELECT \"race_4\" FROM \"hot_wheels_v8_supercar_showdown\" WHERE \"driver\"='kevin heffernan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of game 4?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the most points in the game on November 12?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='november 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances\" (\n \"rank\" real,\n \"player\" text,\n \"club_s\" text,\n \"year_s\" text,\n \"u_17_caps\" real\n);\n\nQuestion: What rank is the team that has a player named Isco Alarc\u00f3n?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"top_appearances\" WHERE \"player\"='isco alarc\u00f3n';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_appearances\" (\n \"rank\" real,\n \"player\" text,\n \"club_s\" text,\n \"year_s\" text,\n \"u_17_caps\" real\n);\n\nQuestion: What is the rank of Club Valencia with a U-17 Caps of 20?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"top_appearances\" WHERE \"club_s\"='valencia' AND \"u_17_caps\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Assists, when High Points is \"T. J. Ford (29)\"?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"high_points\"='t. j. ford (29)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Assists, when Date is \"March 10\"?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='march 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Team is \"@ Atlanta\"?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"team\"='@ atlanta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Team, when Location Attendance is \"Rose Garden 20,020\"?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"location_attendance\"='rose garden 20,020';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when High Points is \"Danny Granger (32)\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"high_points\"='danny granger (32)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the place when the player is Bob Gilder and the money was $20,903?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"money\"='20,903' AND \"player\"='bob gilder';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the Place when Fuzzy Zoeller plated in the United States?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"country\"='united states' AND \"player\"='fuzzy zoeller';" } ]