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 \"2009\" (\n \"block_a\" text,\n \"kaz_hayashi\" text,\n \"nosawa_rongai\" text,\n \"super_crazy\" text,\n \"toshizo\" text\n);\n\nQuestion: Name the kaz hayashi with block A of Shuji Kondo" }, { "role": "assistant", "content": "SELECT \"kaz_hayashi\" FROM \"2009\" WHERE \"block_a\"='shuji kondo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"kaz_hayashi\" text,\n \"nosawa_rongai\" text,\n \"super_crazy\" text,\n \"toshizo\" text\n);\n\nQuestion: Name the block A for shuji kondo" }, { "role": "assistant", "content": "SELECT \"block_a\" FROM \"2009\" WHERE \"toshizo\"='shuji kondo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"block_a\" text,\n \"kaz_hayashi\" text,\n \"nosawa_rongai\" text,\n \"super_crazy\" text,\n \"toshizo\" text\n);\n\nQuestion: Name the NOSAWA Rongai for petey williams" }, { "role": "assistant", "content": "SELECT \"nosawa_rongai\" FROM \"2009\" WHERE \"block_a\"='petey williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What is the largest winner's share in 2008?" }, { "role": "assistant", "content": "SELECT MAX(\"winner_s_share\") FROM \"winners\" WHERE \"year\"='2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What was the score when Nannette Hill was the champion?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"winners\" WHERE \"champion\"='nannette hill';" } ]
[ { "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: On what date did the away team have a score of 9.10 (64)" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_20\" WHERE \"away_team_score\"='9.10 (64)';" } ]
[ { "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: What score did the opposing home team have against Melbourne" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_20\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: Name the home team in a game where the away team's score was 14.12 (96)" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_20\" WHERE \"away_team_score\"='14.12 (96)';" } ]
[ { "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: Name the venue where St Kilda was the opposing away team" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_20\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Crowd has a Home team score of 11.13 (79)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_8\" WHERE \"home_team_score\"='11.13 (79)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Date has a Venue of lake oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_8\" 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 \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Crowd has an Away team of collingwood?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_8\" WHERE \"away_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_and_past_rates\" (\n \"from\" text,\n \"adult_rate\" text,\n \"development_rate\" text,\n \"16_17_year_olds_rate\" text,\n \"apprentice_rate\" text\n);\n\nQuestion: What is the development rate for wages with a 16-17 year old rate of \u00a33.53, and an Adult Rate of \u00a35.73?" }, { "role": "assistant", "content": "SELECT \"development_rate\" FROM \"current_and_past_rates\" WHERE \"16_17_year_olds_rate\"='\u00a33.53' AND \"adult_rate\"='\u00a35.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_and_past_rates\" (\n \"from\" text,\n \"adult_rate\" text,\n \"development_rate\" text,\n \"16_17_year_olds_rate\" text,\n \"apprentice_rate\" text\n);\n\nQuestion: What was the adult rate when the 16-17 year old rate was \u00a33.40?" }, { "role": "assistant", "content": "SELECT \"adult_rate\" FROM \"current_and_past_rates\" WHERE \"16_17_year_olds_rate\"='\u00a33.40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_and_past_rates\" (\n \"from\" text,\n \"adult_rate\" text,\n \"development_rate\" text,\n \"16_17_year_olds_rate\" text,\n \"apprentice_rate\" text\n);\n\nQuestion: When was the rate for 16-17 year olds \u00a33.40?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"current_and_past_rates\" WHERE \"16_17_year_olds_rate\"='\u00a33.40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_and_past_rates\" (\n \"from\" text,\n \"adult_rate\" text,\n \"development_rate\" text,\n \"16_17_year_olds_rate\" text,\n \"apprentice_rate\" text\n);\n\nQuestion: When was there a development rate of \u00a34.92?" }, { "role": "assistant", "content": "SELECT \"from\" FROM \"current_and_past_rates\" WHERE \"development_rate\"='\u00a34.92';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: When Steve Hazlett is the Player, and the PI GP is under 0, what is the average Rd #?" }, { "role": "assistant", "content": "SELECT AVG(\"rd_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='steve hazlett' AND \"pl_gp\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: Which Player has a PI GP over 0 and a Rd # of 1?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pl_gp\">0 AND \"rd_num\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: Which Pick # is the highest and has the Rd # is under 1?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the lowest PI GP when the Reg GP is 1, Murray Bannerman is the Player, and the Pick # is under 58?" }, { "role": "assistant", "content": "SELECT MIN(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\"=1 AND \"player\"='murray bannerman' AND \"pick_num\"<58;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Tell me the average top 25 with events of 5 and cuts madde less than 3" }, { "role": "assistant", "content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"events\"=5 AND \"cuts_made\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Tell me the highest cuts made with wins more than 1" }, { "role": "assistant", "content": "SELECT MAX(\"cuts_made\") FROM \"summary\" WHERE \"wins\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: I want to know the highest wins for cuts made more than 5" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"summary\" WHERE \"cuts_made\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Tell me the sum of top 5 with events less than 12 and top 25 less than 0" }, { "role": "assistant", "content": "SELECT SUM(\"top_5\") FROM \"summary\" WHERE \"events\"<12 AND \"top_25\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the biggest crowd when South Melbourne was an away team?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_17\" 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_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which venue hosted South Melbourne as an away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" 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_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the home team score 15.11 (101)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_17\" WHERE \"home_team_score\"='15.11 (101)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At what venue did the away team score 15.16 (106)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team_score\"='15.16 (106)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when the home team scored 12.21 (93)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"home_team_score\"='12.21 (93)';" } ]
[ { "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 \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many people attended the game on 8 March 2008?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"march\" WHERE \"date\"='8 march 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Away team score when they played Geelong as the Home team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What did the Home team score when the Away team scored 8.14 (62)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"away_team_score\"='8.14 (62)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the Away team when the Home team scored 7.8 (50)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_3\" WHERE \"home_team_score\"='7.8 (50)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the Home team when the Away team scored 4.8 (32)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"away_team_score\"='4.8 (32)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What did Carlton score when they were the Home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the Home team that played Fitzroy as the Away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"away_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ippt_standards\" (\n \"grade\" text,\n \"points\" real,\n \"sit_up_reps\" text,\n \"standing_broad_jump_cm\" text,\n \"chin_up_reps\" text,\n \"shuttle_run_sec\" text,\n \"2_4km_run_min_sec\" text\n);\n\nQuestion: What is the total number of points when the grade was A?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"ippt_standards\" WHERE \"grade\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ippt_standards\" (\n \"grade\" text,\n \"points\" real,\n \"sit_up_reps\" text,\n \"standing_broad_jump_cm\" text,\n \"chin_up_reps\" text,\n \"shuttle_run_sec\" text,\n \"2_4km_run_min_sec\" text\n);\n\nQuestion: Which standing broad jump (cm) had the b grade?" }, { "role": "assistant", "content": "SELECT \"standing_broad_jump_cm\" FROM \"ippt_standards\" WHERE \"grade\"='b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ippt_standards\" (\n \"grade\" text,\n \"points\" real,\n \"sit_up_reps\" text,\n \"standing_broad_jump_cm\" text,\n \"chin_up_reps\" text,\n \"shuttle_run_sec\" text,\n \"2_4km_run_min_sec\" text\n);\n\nQuestion: Which grade did the chin-up (reps) 9-10 receive?" }, { "role": "assistant", "content": "SELECT \"grade\" FROM \"ippt_standards\" WHERE \"chin_up_reps\"='9-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_stats\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What year was the comp 33?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"playoff_stats\" WHERE \"comp\"='33';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_stats\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: In 1984, what was the RAvg?" }, { "role": "assistant", "content": "SELECT \"r_avg\" FROM \"playoff_stats\" WHERE \"year\"='1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_stats\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: In 1983, what was the RAtt?" }, { "role": "assistant", "content": "SELECT \"r_att\" FROM \"playoff_stats\" WHERE \"year\"='1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_stats\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What team has a 94.1 rating?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"playoff_stats\" WHERE \"rate\"='94.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoff_stats\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What year has a RAtt of 1 and a comp of 49?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"playoff_stats\" WHERE \"r_att\"='1' AND \"comp\"='49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who recorded the loss on august 7?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='august 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 the away team was st kilda, what did the home team score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 11.15 (81)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_10\" WHERE \"away_team_score\"='11.15 (81)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 the home team was geelong, what did the away team score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"500_dollars\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: Which Artist has an Issue Price of $8,159.95?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"500_dollars\" WHERE \"issue_price\"='$8,159.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"500_dollars\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the lowest Mintage for the Artist Royal Canadian Mint Engravers, in the Year 2009, with an Issue Price of $10,199.95?" }, { "role": "assistant", "content": "SELECT MIN(\"mintage\") FROM \"500_dollars\" WHERE \"artist\"='royal canadian mint engravers' AND \"issue_price\"='$10,199.95' AND \"year\">2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"500_dollars\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the sum of Artist Steve Hepburn's Mintage?" }, { "role": "assistant", "content": "SELECT SUM(\"mintage\") FROM \"500_dollars\" WHERE \"artist\"='steve hepburn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"500_dollars\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the average Year for the Royal Canadian Mint Engravers Artist when the Mintage is under 200?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"500_dollars\" WHERE \"artist\"='royal canadian mint engravers' AND \"mintage\"<200;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"500_dollars\" (\n \"year\" real,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: When the Year is over 2008, what is the highest Mintage for the Royal Canadian Mint Engravers Artist?" }, { "role": "assistant", "content": "SELECT MAX(\"mintage\") FROM \"500_dollars\" WHERE \"artist\"='royal canadian mint engravers' AND \"year\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_coaches_by_club\" (\n \"name\" text,\n \"nationality\" text,\n \"club\" text,\n \"from\" real,\n \"until\" text\n);\n\nQuestion: What is the name of the New York Red Bulls coach who was from the United States and began after 2010?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"list_of_coaches_by_club\" WHERE \"nationality\"='united states' AND \"from\">2010 AND \"club\"='new york red bulls';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_coaches_by_club\" (\n \"name\" text,\n \"nationality\" text,\n \"club\" text,\n \"from\" real,\n \"until\" text\n);\n\nQuestion: When did Jos\u00e9 Luis S\u00e1nchez Sol\u00e1 end his term of coaching?" }, { "role": "assistant", "content": "SELECT \"until\" FROM \"list_of_coaches_by_club\" WHERE \"name\"='jos\u00e9 luis s\u00e1nchez sol\u00e1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1912_1922\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_withdrawn\" text\n);\n\nQuestion: What is the class of the locomotive with an Eastleigh Works manufacturer, made in 1914, and withdrawn in 1959?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"1912_1922\" WHERE \"manufacturer\"='eastleigh works' AND \"year_made\"='1914' AND \"year_s_withdrawn\"='1959';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1912_1922\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_withdrawn\" text\n);\n\nQuestion: What is the class of the locomotive with a wheel arrangement of 4-6-0 and a quantity made of 14?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"1912_1922\" WHERE \"wheel_arrangement\"='4-6-0' AND \"quantity_made\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1912_1922\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_withdrawn\" text\n);\n\nQuestion: What is the fleet number of the locomotive with 1 quantity made?" }, { "role": "assistant", "content": "SELECT \"fleet_number_s\" FROM \"1912_1922\" WHERE \"quantity_made\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In games where st kilda was the away team, what was the smallest crowd?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_10\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In fitzroy's match where they were the home team, how much did they score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"home_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 score for the home team who plays their matches at the mcg venue?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: Which player has the lowest earnings and has at least 4 wins and is ranked higher than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"wins\"=4 AND \"rank\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: How many wins do the players that earned more than 720,134 have?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"earnings\">'720,134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: Who is the highest ranked player that has earnings below 395,386?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"earnings\"<'395,386';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What player has earnings above 358,770 and a rank smaller than 2?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"leaders\" WHERE \"earnings\">'358,770' AND \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"rams_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: In what Game did Rams Points equal 0?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"schedule\" WHERE \"rams_points\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"rams_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What Opponent has a 6-0 Record?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"record\"='6-0';" } ]
[ { "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 is the sum of the interview scores from North Dakota that have averages less than 8.697, evening gown scores less than 8.73, and swimsuit scores greater than 8.41?" }, { "role": "assistant", "content": "SELECT SUM(\"interview\") FROM \"preliminary_competition\" WHERE \"average\"<8.697 AND \"evening_gown\"<8.73 AND \"state\"='north dakota' AND \"swimsuit\">8.41;" } ]
[ { "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 is the sum of the swimsuit scores from Missouri that have evening gown scores less than 8.77 and average scores less than 8.823?" }, { "role": "assistant", "content": "SELECT SUM(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"evening_gown\"<8.77 AND \"state\"='missouri' AND \"average\"<8.823;" } ]
[ { "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 is the total number of swimsuit scores that have average scores less than 8.823, evening gown scores less than 8.69, and interview scores equal to 8.27?" }, { "role": "assistant", "content": "SELECT COUNT(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"average\"<8.823 AND \"evening_gown\"<8.69 AND \"interview\"=8.27;" } ]
[ { "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 is the lowest swimsuit score where the contestant scored less than 8.56 in the interview and greater than 8.54 in the evening gown?" }, { "role": "assistant", "content": "SELECT MIN(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"interview\"<8.56 AND \"evening_gown\">8.54;" } ]
[ { "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 is the sum of the evening gown scores where the interview score is less than 8.77, the swimsuit score is equal to 7.8, and the average score is less than 8.2?" }, { "role": "assistant", "content": "SELECT SUM(\"evening_gown\") FROM \"preliminary_competition\" WHERE \"interview\"<8.77 AND \"swimsuit\"=7.8 AND \"average\"<8.2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance for the game that has a tie number of 13?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"second_round_proper\" WHERE \"tie_no\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance when the Forest Green Rovers is the away team?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"second_round_proper\" WHERE \"away_team\"='forest green rovers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid number for troy corser with under 22 laps?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"rider\"='troy corser' AND \"laps\"<22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What rider went under 22 laps with grid number 2?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"superbike_race_2_classification\" WHERE \"laps\"<22 AND \"grid\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"franchise_index\" (\n \"country_region\" text,\n \"languages\" text,\n \"premiere\" text,\n \"seasons\" text,\n \"status\" text\n);\n\nQuestion: What country speaks Vietnamese?" }, { "role": "assistant", "content": "SELECT \"country_region\" FROM \"franchise_index\" WHERE \"languages\"='vietnamese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lightweight_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What ranking did Team 250cc Honda end up in when it finished a race with a time of 1:27.57.28?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"lightweight_manx_grand_prix\" WHERE \"team\"='250cc honda' AND \"time\"='1:27.57.28';" } ]
[ { "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: Tell me the constructor for grid of 8" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"=8;" } ]
[ { "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: I want the total number of Grids for heinz-harald frentzen" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='heinz-harald frentzen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 Fitzroy have a home team score of 8.13 (61)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_9\" WHERE \"home_team_score\"='8.13 (61)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 average crowd for the home team of North Melbourne?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='north melbourne';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who was the visiting team on 12 March 2008?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"march\" WHERE \"date\"='12 march 2008';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team where Trail Blazers were the visitor?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"march\" WHERE \"visitor\"='trail blazers';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: In the game on 11 March 2008 with a visiting team of Bucks, who was the home team?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"march\" WHERE \"visitor\"='bucks' AND \"date\"='11 march 2008';" } ]
[ { "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: How many laps for robin montgomerie-charrington, and a Grid smaller than 15?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"driver\"='robin montgomerie-charrington' AND \"grid\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the mean number of totals with no silvers and a bronze number less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_count\" WHERE \"silver\"=0 AND \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least number of Silvers with a ranking of less than 4 where the bronze number was larger than 9?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_count\" WHERE \"rank\"<4 AND \"bronze\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which mean rank had a silver number smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"medal_count\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least total number with a rank of 4 and a total silver number bigger than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_count\" WHERE \"rank\"=4 AND \"silver\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Name the category for 2nd melon music awards" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"award\"='2nd melon music awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Name the award won in the hall of fame" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"result\"='won' AND \"category\"='hall of fame';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Name the nomination in 2011 that won" }, { "role": "assistant", "content": "SELECT \"nomination\" FROM \"awards_and_nominations\" WHERE \"year\"=2011 AND \"result\"='won';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Name the result in 2010 for bgm cyworld" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"year\"=2010 AND \"award\"='bgm cyworld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: What is the car # of the Chevrolet that complete 363 laps?" }, { "role": "assistant", "content": "SELECT COUNT(\"car_num\") FROM \"race_results\" WHERE \"make\"='chevrolet' AND \"laps\"=363;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: How many points did the driver who won $127,541 driving car #31 get?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"race_results\" WHERE \"winnings\"='$127,541' AND \"car_num\">31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"english_title\" text,\n \"korean_title\" text,\n \"romanization\" text,\n \"role\" text,\n \"director\" text\n);\n\nQuestion: What is the english title of the film before 1999 with a role of kim da-rim?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"filmography\" WHERE \"year\"<1999 AND \"role\"='kim da-rim';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"english_title\" text,\n \"korean_title\" text,\n \"romanization\" text,\n \"role\" text,\n \"director\" text\n);\n\nQuestion: What English title for the Romanization of lee jae-su-eui nan?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"filmography\" WHERE \"romanization\"='lee jae-su-eui nan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"english_title\" text,\n \"korean_title\" text,\n \"romanization\" text,\n \"role\" text,\n \"director\" text\n);\n\nQuestion: What is the Romanization for my old sweetheart?" }, { "role": "assistant", "content": "SELECT \"romanization\" FROM \"filmography\" WHERE \"english_title\"='my old sweetheart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"english_title\" text,\n \"korean_title\" text,\n \"romanization\" text,\n \"role\" text,\n \"director\" text\n);\n\nQuestion: What is the English of chae soo-yeon?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"filmography\" WHERE \"role\"='chae soo-yeon';" } ]