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 \"european_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who were the runners-up at the Alfred Dunhill Links Championship?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"european_tour_wins_5\" WHERE \"tournament\"='alfred dunhill links championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"grid\" real,\n \"driver\" text,\n \"constructor\" text,\n \"qual\" real,\n \"rank\" real,\n \"laps\" real,\n \"time_retired\" text\n);\n\nQuestion: Name the highest grid for Laps more than 137 and rank is less than 8" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"laps\">137 AND \"rank\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"grid\" real,\n \"driver\" text,\n \"constructor\" text,\n \"qual\" real,\n \"rank\" real,\n \"laps\" real,\n \"time_retired\" text\n);\n\nQuestion: I want the total number of rank for Grid less than 20 and dick rathmann and Qual more than 130.92" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"classification\" WHERE \"grid\"<20 AND \"driver\"='dick rathmann' AND \"qual\">130.92;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: Which nation won 1 gold medal and 1 bronze, for a total of 2 medals?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_count\" WHERE \"gold\"='1' AND \"bronze\"='1' AND \"total\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\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: What is the name of the Leading scorer when the Home was the Trail blazers?" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"april\" WHERE \"home\"='trail blazers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2501_2600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: I want the sum of NGC number for spiral galaxy and right acension of 08h14m40.4s" }, { "role": "assistant", "content": "SELECT SUM(\"ngc_number\") FROM \"2501_2600\" WHERE \"object_type\"='spiral galaxy' AND \"right_ascension_j2000\"='08h14m40.4s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2501_2600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Tell me the right ascension for open cluster and NGC number more than 2547" }, { "role": "assistant", "content": "SELECT \"right_ascension_j2000\" FROM \"2501_2600\" WHERE \"object_type\"='open cluster' AND \"ngc_number\">2547;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2501_2600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: I want the constellation for declination for \u00b045\u2032 and right ascension of 07h58m" }, { "role": "assistant", "content": "SELECT \"constellation\" FROM \"2501_2600\" WHERE \"declination_j2000\"='\u00b045\u2032' AND \"right_ascension_j2000\"='07h58m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2501_2600\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: I want the NGC number for right ascension of 08h11m13.6s" }, { "role": "assistant", "content": "SELECT \"ngc_number\" FROM \"2501_2600\" WHERE \"right_ascension_j2000\"='08h11m13.6s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd when the home team is north melbourne?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_13\" 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 \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the crowd total at mcg?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_13\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_wildlife_series\" (\n \"year\" real,\n \"animal\" text,\n \"artist\" text,\n \"finish\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: How many Red Breasted Nuthatch coins created before 2007 were minted, on average?" }, { "role": "assistant", "content": "SELECT AVG(\"mintage\") FROM \"canadian_wildlife_series\" WHERE \"animal\"='red breasted nuthatch' AND \"year\"<2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_wildlife_series\" (\n \"year\" real,\n \"animal\" text,\n \"artist\" text,\n \"finish\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What year was the downy woodpecker coin created?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"canadian_wildlife_series\" WHERE \"animal\"='downy woodpecker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_wildlife_series\" (\n \"year\" real,\n \"animal\" text,\n \"artist\" text,\n \"finish\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: Which artist created coins before 2010?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"canadian_wildlife_series\" WHERE \"year\"<2010;" } ]
[ { "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 game number against the team Boston?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"team\"='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 \"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 date of game 23?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"twin_town\" (\n \"village_german\" text,\n \"village_slovenian\" text,\n \"number_of_peoople_1991\" real,\n \"percent_of_slovenes_1991\" text,\n \"percent_of_slovenes_1951\" text\n);\n\nQuestion: What percentage of Slovenes lived in the village of Roach in 1951?" }, { "role": "assistant", "content": "SELECT \"percent_of_slovenes_1951\" FROM \"twin_town\" WHERE \"village_german\"='roach';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 has an Away team of south melbourne?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_15\" 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_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Crowd has an Away team score of 17.11 (113)?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_15\" WHERE \"away_team_score\"='17.11 (113)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 has a Home team score of 13.11 (89)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_15\" WHERE \"home_team_score\"='13.11 (89)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 Away team scored 21.10 (136)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"away_team_score\"='21.10 (136)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the Melbourne team score in their away game?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_6\" 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_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team plays at the arden street oval Venue?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 Home team Venue for the hawthorn team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_6\" WHERE \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 Home team plays at the princes park Venue?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: Was the game against the Rattlers at the United Sports Training Center a home game or an away game?" }, { "role": "assistant", "content": "SELECT \"home_away\" FROM \"schedule\" WHERE \"opponent\"='rattlers' AND \"field\"='united sports training center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What was the opponent for the game at Multi-sport Field?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"field\"='multi-sport field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What is the result of the away game played on August 4?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"home_away\"='away' AND \"date\"='august 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: On which field was the game played on July 12?" }, { "role": "assistant", "content": "SELECT \"field\" FROM \"schedule\" WHERE \"date\"='july 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"scored\" real\n);\n\nQuestion: At what venue did Sigurd Rushfeldt score 1 point in the 2006 FIFA World Cup Qualification competition?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"scored\"=1 AND \"competition\"='2006 fifa world cup qualification';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"scored\" real\n);\n\nQuestion: What date did Sigurd Rushfeldt score less than 2 points in the UEFA Euro 2004 qualifying competition?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"scored\"<2 AND \"competition\"='uefa euro 2004 qualifying';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_10_5_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the tournament on February 17, 2002?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_10_5_5\" WHERE \"date\"='february 17, 2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"update_november_14_2012\" (\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"first_games\" text,\n \"last_games\" text\n);\n\nQuestion: How many goals does mitsuo kato have?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"update_november_14_2012\" WHERE \"player\"='mitsuo kato';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: Which engine has the entrant scuderia ferrari and is driven by Raymond Sommer?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"entries\" WHERE \"entrant\"='scuderia ferrari' AND \"driver\"='raymond sommer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text\n);\n\nQuestion: What Chassis does Reg Parnell drive?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"entries\" WHERE \"driver\"='reg parnell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is Ryan McCay's speed that has a rank better than 8?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"junior_manx_grand_prix\" WHERE \"rank\">8 AND \"rider\"='ryan mccay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What's the name of the team that went 113.316mph?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"junior_manx_grand_prix\" WHERE \"speed\"='113.316mph';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What's Matts Nilsson's team that's ranked better than 7?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"junior_manx_grand_prix\" WHERE \"rank\"<7 AND \"rider\"='matts nilsson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"air_movement_table_mission_boston\" (\n \"serial\" real,\n \"airborne_unit\" text,\n \"troop_carrier_group\" text,\n \"num_of_c_47s\" real,\n \"uk_base\" text,\n \"drop_zone\" text,\n \"drop_zone_time\" real\n);\n\nQuestion: What is the average drop zone time in the N drop zone for the 1st Pathfinder Prov.?" }, { "role": "assistant", "content": "SELECT AVG(\"drop_zone_time\") FROM \"air_movement_table_mission_boston\" WHERE \"drop_zone\"='n' AND \"troop_carrier_group\"='1st pathfinder prov.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"air_movement_table_mission_boston\" (\n \"serial\" real,\n \"airborne_unit\" text,\n \"troop_carrier_group\" text,\n \"num_of_c_47s\" real,\n \"uk_base\" text,\n \"drop_zone\" text,\n \"drop_zone_time\" real\n);\n\nQuestion: Which UK Base has an airborne unit of Pathfinders?" }, { "role": "assistant", "content": "SELECT \"uk_base\" FROM \"air_movement_table_mission_boston\" WHERE \"airborne_unit\"='pathfinders';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What was the number of high assists for game 1?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"playoffs\" WHERE \"game\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"state\" text,\n \"born_died\" text,\n \"active_service\" text,\n \"chief_judge\" text,\n \"senior_status\" text,\n \"appointed_by\" text,\n \"reason_for_termination\" text\n);\n\nQuestion: Tell me the chief judge which has reason for termination of retirement" }, { "role": "assistant", "content": "SELECT \"chief_judge\" FROM \"former_judges\" WHERE \"reason_for_termination\"='retirement';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: For boozer (13) what is the high assists and high rebounds?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"playoffs\" WHERE \"high_rebounds\"='boozer (13)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What is the score for the game that is less than 4 and a high points of williams (28)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\"<4 AND \"high_points\"='williams (28)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wrestling\" (\n \"athlete\" text,\n \"event\" text,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"final\" text\n);\n\nQuestion: Which athlete in the 76 kg class, did not advance at the end of Round 3." }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"wrestling\" WHERE \"round_3\"='did not advance' AND \"event\"='76 kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_full_chart\" (\n \"finish_position\" text,\n \"lengths_behind\" text,\n \"post_position\" real,\n \"horse_name\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"owner\" text,\n \"post_time_odds\" text\n);\n\nQuestion: Who owns the horse with a post position of less than 4 with jockey todd pletcher?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"the_full_chart\" WHERE \"post_position\"<4 AND \"jockey\"='todd pletcher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_full_chart\" (\n \"finish_position\" text,\n \"lengths_behind\" text,\n \"post_position\" real,\n \"horse_name\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"owner\" text,\n \"post_time_odds\" text\n);\n\nQuestion: What jockey is on hard spun?" }, { "role": "assistant", "content": "SELECT \"jockey\" FROM \"the_full_chart\" WHERE \"horse_name\"='hard spun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_full_chart\" (\n \"finish_position\" text,\n \"lengths_behind\" text,\n \"post_position\" real,\n \"horse_name\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"owner\" text,\n \"post_time_odds\" text\n);\n\nQuestion: What horse does todd pletcher ride with odds of 14.20-1?" }, { "role": "assistant", "content": "SELECT \"horse_name\" FROM \"the_full_chart\" WHERE \"jockey\"='todd pletcher' AND \"post_time_odds\"='14.20-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_full_chart\" (\n \"finish_position\" text,\n \"lengths_behind\" text,\n \"post_position\" real,\n \"horse_name\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"owner\" text,\n \"post_time_odds\" text\n);\n\nQuestion: Who the Owner that has a Lengths Behind of 5\u00bd?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"the_full_chart\" WHERE \"lengths_behind\"='5\u00bd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"date_of_birth_age\" text,\n \"club\" text,\n \"caps\" text,\n \"goals\" text\n);\n\nQuestion: What is the date of birth and age of Gabriel Quak Jun Yi with 3 caps?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"current_squad\" WHERE \"caps\"='3' AND \"name\"='gabriel quak jun yi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"date_of_birth_age\" text,\n \"club\" text,\n \"caps\" text,\n \"goals\" text\n);\n\nQuestion: Which club is associated with Hafiz Abu Sujad?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"current_squad\" WHERE \"name\"='hafiz abu sujad';" } ]
[ { "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 sum of a rank whose nation is West Germany and has bronze larger than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"medal_table\" WHERE \"nation\"='west germany' 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_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 total of Bronze with a total smaller than 3, and a nation of Poland, and a rank larger than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"total\"<3 AND \"nation\"='poland' AND \"rank\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_2_q\" text,\n \"loans_received_2_q\" text,\n \"money_spent_2_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text\n);\n\nQuestion: What were the total receipts when the money raised in 2Q was $33,120,440?" }, { "role": "assistant", "content": "SELECT \"total_receipts\" FROM \"democrats\" WHERE \"money_raised_2_q\"='$33,120,440';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_2_q\" text,\n \"loans_received_2_q\" text,\n \"money_spent_2_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text\n);\n\nQuestion: How much money was spent in 2Q when the total receipts were $1,117,566?" }, { "role": "assistant", "content": "SELECT \"money_spent_2_q\" FROM \"democrats\" WHERE \"total_receipts\"='$1,117,566';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_2_q\" text,\n \"loans_received_2_q\" text,\n \"money_spent_2_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text\n);\n\nQuestion: How much money was raised in the 2Q when the total receipts were $63,075,927?" }, { "role": "assistant", "content": "SELECT \"money_raised_2_q\" FROM \"democrats\" WHERE \"total_receipts\"='$63,075,927';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"money_raised_2_q\" text,\n \"loans_received_2_q\" text,\n \"money_spent_2_q\" text,\n \"total_receipts\" text,\n \"cash_on_hand\" text\n);\n\nQuestion: How much cash was on hand when the money spent in the 2Q was $16,042,388?" }, { "role": "assistant", "content": "SELECT \"cash_on_hand\" FROM \"democrats\" WHERE \"money_spent_2_q\"='$16,042,388';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the driver peter gethin has a grid less than 25, what is the average number of laps?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"driver\"='peter gethin' AND \"grid\"<25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"time_retired\"='+ 2 laps' AND \"driver\"='mike hailwood' AND \"grid\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\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 team was the home team when playing South Melbourne?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_4\" 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_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team when they played Richmond?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd number when Hawthorn was the away team?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_4\" WHERE \"away_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_founders_cup\" (\n \"season\" text,\n \"stage_reached\" text,\n \"against\" text,\n \"score\" text,\n \"venue\" text\n);\n\nQuestion: What is the stage reached for venue edmonton green?" }, { "role": "assistant", "content": "SELECT \"stage_reached\" FROM \"national_founders_cup\" WHERE \"venue\"='edmonton green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2001_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the average round for Club team of garmisch-partenkirchen riessersee sc (germany 2)?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"2001_draft_picks\" WHERE \"club_team\"='garmisch-partenkirchen riessersee sc (germany 2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: What richmond player played against st kilda?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"goal_to_win\" WHERE \"opponent\"='st kilda' AND \"team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: What player played in 2000?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"goal_to_win\" WHERE \"year\"=2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: What year for geelong player john roberts?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"goal_to_win\" WHERE \"opponent\"='geelong' AND \"player\"='john roberts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"henderson_massey_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What's the authority when the roll is 40?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"henderson_massey_local_board\" WHERE \"roll\"=40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"henderson_massey_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What's the authority when the roll is less than 234 for the massey east area?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"henderson_massey_local_board\" WHERE \"roll\"<234 AND \"area\"='massey east';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"henderson_massey_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What's the roll for summerland primary when decile is over 6?" }, { "role": "assistant", "content": "SELECT \"roll\" FROM \"henderson_massey_local_board\" WHERE \"decile\">6 AND \"name\"='summerland primary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_table\" (\n \"l_cr_no\" real,\n \"type\" text,\n \"manufacturer\" text,\n \"delivered\" text,\n \"name\" text,\n \"jt_cttee_no\" real,\n \"1845_disposal\" text\n);\n\nQuestion: What is the name where the delivered date is 1839/08?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"summary_table\" WHERE \"delivered\"='1839/08';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"original_story_author\" text,\n \"director\" text,\n \"original_u_s_air_date\" text,\n \"original_canadian_air_date\" text\n);\n\nQuestion: What is the Original U.S. air-date for the Original Canadian air-date of december 9, 2007?" }, { "role": "assistant", "content": "SELECT \"original_u_s_air_date\" FROM \"episodes\" WHERE \"original_canadian_air_date\"='december 9, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"original_story_author\" text,\n \"director\" text,\n \"original_u_s_air_date\" text,\n \"original_canadian_air_date\" text\n);\n\nQuestion: What is the Original Canadian air-date that was directed by Michael Tolkin?" }, { "role": "assistant", "content": "SELECT \"original_canadian_air_date\" FROM \"episodes\" WHERE \"director\"='michael tolkin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"original_story_author\" text,\n \"director\" text,\n \"original_u_s_air_date\" text,\n \"original_canadian_air_date\" text\n);\n\nQuestion: What is the name of the author of \" jerry was a man \"?" }, { "role": "assistant", "content": "SELECT \"original_story_author\" FROM \"episodes\" WHERE \"title\"='\\\" jerry was a man \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"original_story_author\" text,\n \"director\" text,\n \"original_u_s_air_date\" text,\n \"original_canadian_air_date\" text\n);\n\nQuestion: What was the Original Canadian air-date for the episode directed by mark rydell?" }, { "role": "assistant", "content": "SELECT \"original_canadian_air_date\" FROM \"episodes\" WHERE \"director\"='mark rydell';" } ]
[ { "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 home team faced an away team that scored 8.9 (57)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"away_team_score\"='8.9 (57)';" } ]
[ { "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 home team's venue is junction oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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 venue was melbourne the away team of?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_8\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home teams score against the away team footscray?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"long\" real\n);\n\nQuestion: What is the average long that Ramon Richardson played and an average greater than 5.5?" }, { "role": "assistant", "content": "SELECT AVG(\"long\") FROM \"wide_receivers\" WHERE \"player\"='ramon richardson' AND \"avg\">5.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"long\" real\n);\n\nQuestion: Which has and average less than 3 and the lowest yards?" }, { "role": "assistant", "content": "SELECT MIN(\"yards\") FROM \"wide_receivers\" WHERE \"avg\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"long\" real\n);\n\nQuestion: What is the average rec that is greater than 10 and has 40 yards?" }, { "role": "assistant", "content": "SELECT AVG(\"rec\") FROM \"wide_receivers\" WHERE \"yards\"=40 AND \"avg\">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 was the high assists for game 31?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"game\"=31;" } ]
[ { "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 team played in game 39?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=39;" } ]
[ { "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: How many people attended game 42?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"game\"=42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"asian_youth_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest Shooting Total with a Bronze less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"asian_youth_games\" WHERE \"sport\"='shooting' AND \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"asian_youth_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Silver in the Total Sport has less than 1 Gold and more than 1 Bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"asian_youth_games\" WHERE \"bronze\">1 AND \"sport\"='total' AND \"gold\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"asian_youth_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the football Bronze with more than 1 Silver?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"asian_youth_games\" WHERE \"sport\"='football' AND \"silver\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"asian_youth_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: With 1 Gold, more than 2 Bronze and Total greater than 1, what is the Silver?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"asian_youth_games\" WHERE \"total\">1 AND \"gold\"=1 AND \"bronze\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"asian_youth_games\" (\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: With more than 1 Gold and Silver and Total Sport, what is the Total?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"asian_youth_games\" WHERE \"silver\">1 AND \"sport\"='total' AND \"gold\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_canadian_tire_series\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"distance_duration\" text\n);\n\nQuestion: What year does robin buck go 44 laps?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"nascar_canadian_tire_series\" WHERE \"distance_duration\"='44 laps' AND \"driver\"='robin buck';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_canadian_tire_series\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"distance_duration\" text\n);\n\nQuestion: How many years does Team wal-mart / tide participate?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"nascar_canadian_tire_series\" WHERE \"team\"='wal-mart / tide';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which score has a Result of 11\u20130?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_career\" WHERE \"result\"='11\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which result has a Score of 1\u20131?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_career\" WHERE \"score\"='1\u20131';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which score has a Result of 11\u20130?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_career\" WHERE \"result\"='11\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game with an 11-32-11 record?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"february\" WHERE \"record\"='11-32-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the home team of the game where New Jersey was the visitor team and the record was 11-35-12?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"february\" WHERE \"visitor\"='new jersey' AND \"record\"='11-35-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the visitor team of the game with Chicago as the home team?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"february\" WHERE \"home\"='chicago';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game on February 27 with New Jersey as the visitor team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"february\" WHERE \"visitor\"='new jersey' AND \"date\"='february 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the home team of the game on February 3?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"february\" WHERE \"date\"='february 3';" } ]