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 \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is Player, when Total is greater than 148, and when To Par is \"12\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"total\">148 AND \"to_par\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the sum of To Par, when Year(s) Won is \"1978 , 1985\"?" }, { "role": "assistant", "content": "SELECT SUM(\"to_par\") FROM \"missed_the_cut\" WHERE \"year_s_won\"='1978 , 1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is To Par, when Year(s) Won is \"1968 , 1971\"?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"missed_the_cut\" WHERE \"year_s_won\"='1968 , 1971';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"points\" text\n);\n\nQuestion: Which Points difference has Points against of 786?" }, { "role": "assistant", "content": "SELECT \"points_difference\" FROM \"2004_05_table\" WHERE \"points_against\"='786';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"points\" text\n);\n\nQuestion: Which Played has a Points difference of +261?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"2004_05_table\" WHERE \"points_difference\"='+261';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"points\" text\n);\n\nQuestion: Which Points against has a Lost of 13, and Points for of 671?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"2004_05_table\" WHERE \"lost\"='13' AND \"points_for\"='671';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"points\" text\n);\n\nQuestion: Which Points difference has Played of 32, and Points for of 840?" }, { "role": "assistant", "content": "SELECT \"points_difference\" FROM \"2004_05_table\" WHERE \"played\"='32' AND \"points_for\"='840';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"points\" text\n);\n\nQuestion: Which Drawn has Points for of 782?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2004_05_table\" WHERE \"points_for\"='782';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2004_05_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"points\" text\n);\n\nQuestion: Which Lost has a Club of club?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"2004_05_table\" WHERE \"club\"='club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Record that has the Date of january 29?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='january 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Record that has the Visitor of vancouver?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"visitor\"='vancouver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_11\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What date has the opponent competing in the final of john mcenroe?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"wins_11\" WHERE \"opponent_in_final\"='john mcenroe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time\" text,\n \"result\" text\n);\n\nQuestion: Where did the Lightning play the NY Rangers at 7:00 pm?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pre_season\" WHERE \"opponent\"='ny rangers' AND \"time\"='7:00 pm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time\" text,\n \"result\" text\n);\n\nQuestion: Who did the Lightning play at the Mellon Arena?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"pre_season\" WHERE \"location\"='mellon arena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time\" text,\n \"result\" text\n);\n\nQuestion: What was the final score for the game played at 7:00 pm?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"pre_season\" WHERE \"time\"='7:00 pm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time\" text,\n \"result\" text\n);\n\nQuestion: Where was the game which ended in a 4-1 w?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pre_season\" WHERE \"result\"='4-1 w';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time\" text,\n \"result\" text\n);\n\nQuestion: When was a game played at 7:00 pm?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"pre_season\" WHERE \"time\"='7:00 pm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model_name\" text,\n \"engine\" text,\n \"top_speed\" text,\n \"no_of_gears\" real,\n \"electrics\" text\n);\n\nQuestion: Which Top Speed has a Model Name of d14/4 supreme d14/4 sports & bushman?" }, { "role": "assistant", "content": "SELECT \"top_speed\" FROM \"models\" WHERE \"model_name\"='d14/4 supreme d14/4 sports & bushman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model_name\" text,\n \"engine\" text,\n \"top_speed\" text,\n \"no_of_gears\" real,\n \"electrics\" text\n);\n\nQuestion: Which Electrics has an Engine of 175cc, bhp (kw), and a Model Name of d10 sports & bushman?" }, { "role": "assistant", "content": "SELECT \"electrics\" FROM \"models\" WHERE \"engine\"='175cc, bhp (kw)' AND \"model_name\"='d10 sports & bushman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Who does p\u00e1draig harrington play for?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_round\" WHERE \"player\"='p\u00e1draig harrington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"k_league_clubs_2008\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2007_season\" text\n);\n\nQuestion: Which stadium has Seongnam Ilhwa Chunma?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"k_league_clubs_2008\" WHERE \"club\"='seongnam ilhwa chunma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"k_league_clubs_2008\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2007_season\" text\n);\n\nQuestion: What city is Gwang-Yang stadium in?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"k_league_clubs_2008\" WHERE \"stadium\"='gwang-yang stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"k_league_clubs_2008\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2007_season\" text\n);\n\nQuestion: Which stadium has FC Seoul?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"k_league_clubs_2008\" WHERE \"club\"='fc seoul';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"k_league_clubs_2008\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2007_season\" text\n);\n\nQuestion: What stadium is in Seoul?" }, { "role": "assistant", "content": "SELECT \"stadium\" FROM \"k_league_clubs_2008\" WHERE \"city\"='seoul';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1993 value of the French open?" }, { "role": "assistant", "content": "SELECT \"1993\" FROM \"doubles_performance_timeline\" WHERE \"tournament\"='french open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1990 value with a 24 in 1995?" }, { "role": "assistant", "content": "SELECT \"1990\" FROM \"doubles_performance_timeline\" WHERE \"1995\"='24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1993 value with a 1r in 1991 and sf in 1990?" }, { "role": "assistant", "content": "SELECT \"1993\" FROM \"doubles_performance_timeline\" WHERE \"1991\"='1r' AND \"1990\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1994 value with a 2r in 1996, A in 1993, and 2r in 1991?" }, { "role": "assistant", "content": "SELECT \"1994\" FROM \"doubles_performance_timeline\" WHERE \"1996\"='2r' AND \"1993\"='a' AND \"1991\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1993 value of the 1994 atp masters series?" }, { "role": "assistant", "content": "SELECT \"1993\" FROM \"doubles_performance_timeline\" WHERE \"1994\"='atp masters series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is the 1993 value of the 1996 atp masters series?" }, { "role": "assistant", "content": "SELECT \"1993\" FROM \"doubles_performance_timeline\" WHERE \"1996\"='atp masters series';" } ]
[ { "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 \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Which Team has a Location Attendance of staples center 18,997, and a Series of 1\u20130?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"playoffs\" WHERE \"location_attendance\"='staples center 18,997' AND \"series\"='1\u20130';" } ]
[ { "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 \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Which High points have High rebounds of lamar odom (15), and a Date of april 27?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"high_rebounds\"='lamar odom (15)' AND \"date\"='april 27';" } ]
[ { "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 \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Which Date has High rebounds of pau gasol (9)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"playoffs\" WHERE \"high_rebounds\"='pau gasol (9)';" } ]
[ { "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 \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What was the score of game 2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was steve elkington's to par?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"player\"='steve elkington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"season\" text,\n \"episodes\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"peak_series_rating_citation_needed\" text,\n \"average_series_rating\" text,\n \"dvd_release_date\" text,\n \"discs\" real\n);\n\nQuestion: With a Season premiere of 23 july 2008 this show has what as the average episode?" }, { "role": "assistant", "content": "SELECT AVG(\"episodes\") FROM \"overview\" WHERE \"season_premiere\"='23 july 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"season\" text,\n \"episodes\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"peak_series_rating_citation_needed\" text,\n \"average_series_rating\" text,\n \"dvd_release_date\" text,\n \"discs\" real\n);\n\nQuestion: Which show has a season premiere with a Average series rating of 1.85 million viewers?" }, { "role": "assistant", "content": "SELECT \"season_premiere\" FROM \"overview\" WHERE \"average_series_rating\"='1.85 million viewers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"enrollment\" real,\n \"nickname\" text\n);\n\nQuestion: What is the most recent year founded that has a nickname of bruins?" }, { "role": "assistant", "content": "SELECT MAX(\"founded\") FROM \"members\" WHERE \"nickname\"='bruins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"school\" text,\n \"location\" text,\n \"founded\" real,\n \"enrollment\" real,\n \"nickname\" text\n);\n\nQuestion: What is the most recent year founded with an enrollment of 42,708?" }, { "role": "assistant", "content": "SELECT MAX(\"founded\") FROM \"members\" WHERE \"enrollment\"='42,708';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\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 the New York Rangers Home team with a Record of 8\u201327\u20135?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"home\"='new york rangers' AND \"record\"='8\u201327\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: On what Date was the Home team Detroit Red Wings with a Record of 10\u201341\u20136?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"regular_season\" WHERE \"home\"='detroit red wings' AND \"record\"='10\u201341\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Visitor in the game with a Record of 11\u201349\u20137?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"record\"='11\u201349\u20137';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Record of the Chicago Black Hawks Home game with the New York Rangers and a Score of 3\u20132?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"home\"='chicago black hawks' AND \"visitor\"='new york rangers' AND \"score\"='3\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Home team on October 17 with a Score of 1\u20132?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"score\"='1\u20132' AND \"date\"='october 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Record of the game on January 31 with Visitors Detroit Red Wings?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"visitor\"='detroit red wings' AND \"date\"='january 31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Name the Report of 7 february with an Away team of new zealand breakers?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"round_21\" WHERE \"date\"='7 february' AND \"away_team\"='new zealand breakers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Which Date has a Crowd smaller than 4,485?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_21\" WHERE \"crowd\"<'4,485';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Name the lowest Crowd of hisense arena on 8 february?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_21\" WHERE \"venue\"='hisense arena' AND \"date\"='8 february';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Name the Box Score which has an Away team of new zealand breakers on 7 february?" }, { "role": "assistant", "content": "SELECT \"box_score\" FROM \"round_21\" WHERE \"away_team\"='new zealand breakers' AND \"date\"='7 february';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the lowest Year, when Venue is Rio De Janeiro, Brazil?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"venue\"='rio de janeiro, brazil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is Event, when Year is 2008?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the latest date in March when the opponent was the Boston Bruins and the game number was smaller than 66?" }, { "role": "assistant", "content": "SELECT MAX(\"march\") FROM \"schedule_and_results\" WHERE \"opponent\"='boston bruins' AND \"game\"<66;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the method of the match with chris ade as the opponent?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='chris ade';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"race\" real,\n \"podium\" real,\n \"pole\" real,\n \"f_lap\" real\n);\n\nQuestion: What was the pole for a race lower than 16 with a Flap higher than 8 and a podium higher than 11?" }, { "role": "assistant", "content": "SELECT AVG(\"pole\") FROM \"by_season\" WHERE \"race\"<16 AND \"f_lap\">8 AND \"podium\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"race\" real,\n \"podium\" real,\n \"pole\" real,\n \"f_lap\" real\n);\n\nQuestion: How many podiums had a race higher than 14 in 1996 and a Flap lower than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"podium\") FROM \"by_season\" WHERE \"race\">14 AND \"season\"='1996' AND \"f_lap\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"race\" real,\n \"podium\" real,\n \"pole\" real,\n \"f_lap\" real\n);\n\nQuestion: How many races had 4 podiums, 5 poles and more than 3 Flaps?" }, { "role": "assistant", "content": "SELECT SUM(\"race\") FROM \"by_season\" WHERE \"podium\"=4 AND \"pole\"=5 AND \"f_lap\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" text,\n \"race\" real,\n \"podium\" real,\n \"pole\" real,\n \"f_lap\" real\n);\n\nQuestion: What are the fewest podiums in 2005 with fewer than 0 poles?" }, { "role": "assistant", "content": "SELECT MIN(\"podium\") FROM \"by_season\" WHERE \"season\"='2005' AND \"pole\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which Player has a To par of +9?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which years did raymond floyd win?" }, { "role": "assistant", "content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"player\"='raymond floyd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: How much total has a To par of +9?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"made_the_cut\" WHERE \"to_par\"='+9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which Total has a Country of united states, and a Player of andy north?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"country\"='united states' AND \"player\"='andy north';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest grid for Aprilia vehicles, laps over 5, and a retirement finish?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"time\"='retirement' AND \"laps\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average laps completed by riders with times of +2:11.524?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"125cc_classification\" WHERE \"time\"='+2:11.524';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which rider has a time of +2:11.524?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"125cc_classification\" WHERE \"time\"='+2:11.524';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid for vehicles manufactured by Aprilia and having run more than 16 laps?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"laps\">16;" } ]
[ { "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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What record has January 27 for the date?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='january 27';" } ]
[ { "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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What team has brad miller (8) as the high assists?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_assists\"='brad miller (8)';" } ]
[ { "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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the high assists that has @ detroit as the team?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"team\"='@ detroit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s_giants_12_9\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Which date had a game with the New York Giants as the winner, year over 1985, and a result of 17-14?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1980s_giants_12_9\" WHERE \"winner\"='new york giants' AND \"year\">1985 AND \"result\"='17-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s_giants_12_9\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Which date had a year under 1988, loser of Philadelphia Eagles, location of Giants Stadium, and a result of 21-0?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1980s_giants_12_9\" WHERE \"year\"<1988 AND \"loser\"='philadelphia eagles' AND \"location\"='giants stadium' AND \"result\"='21-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1980s_giants_12_9\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Which date had a loser of New York Giants and a result of 23-17?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1980s_giants_12_9\" WHERE \"loser\"='new york giants' AND \"result\"='23-17';" } ]
[ { "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: HOW MANY SILVER METALS DOES SOUTH KOREA HAVE WITH 2 GOLD METALS?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"nation\"='south korea' AND \"gold\">2;" } ]
[ { "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 COUNTRY HAS THE HIGHEST BRONZE COUNT, MORE THAN 1 SILVER METAL, AND LESS THAN 1ST PLACE?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\">1 AND \"rank\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_performing_clubs_in_the_prime_league\" (\n \"club\" text,\n \"champions\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: What is the average 4th-Place, when Runners-Up is less than 1, when Club is \"Tanjong Pagar United FC\", and when 3rd-Place is greater than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"4th_place\") FROM \"top_performing_clubs_in_the_prime_league\" WHERE \"runners_up\"<1 AND \"club\"='tanjong pagar united fc' AND \"3rd_place\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_performing_clubs_in_the_prime_league\" (\n \"club\" text,\n \"champions\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: What is the highest Runners-Up, when Champions is less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"runners_up\") FROM \"top_performing_clubs_in_the_prime_league\" WHERE \"champions\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_performing_clubs_in_the_prime_league\" (\n \"club\" text,\n \"champions\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: What is the average Runners-Up, when 4th-Place is greater than 1, and when Champions is \"2\"?" }, { "role": "assistant", "content": "SELECT AVG(\"runners_up\") FROM \"top_performing_clubs_in_the_prime_league\" WHERE \"4th_place\">1 AND \"champions\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_performing_clubs_in_the_prime_league\" (\n \"club\" text,\n \"champions\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: What is the sum of Runners-Up, when Champions is greater than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"runners_up\") FROM \"top_performing_clubs_in_the_prime_league\" WHERE \"champions\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_performing_clubs_in_the_prime_league\" (\n \"club\" text,\n \"champions\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: What is the highest 3rd-Place, when Club is \"Home United FC\", and when 4th-Place is less than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"3rd_place\") FROM \"top_performing_clubs_in_the_prime_league\" WHERE \"club\"='home united fc' AND \"4th_place\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championships_per_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total medals for nation with more than 0 silvers and more than 0 golds?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"championships_per_nation\" WHERE \"silver\">0 AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championships_per_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest gold medals for a team with fewer than 1 silver, more than 1 bronze and a total less than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"championships_per_nation\" WHERE \"silver\"<1 AND \"total\"<4 AND \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championships_per_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest rank when there are fewer than 1 silver, 4 golds and less than 0 bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"championships_per_nation\" WHERE \"silver\"<1 AND \"gold\"=4 AND \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championships_per_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals for a nation with rank less than 5, more than 0 silvers and a total of 2 medals?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"championships_per_nation\" WHERE \"rank\"<5 AND \"silver\">0 AND \"total\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championships_per_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total for the team with more than 2 golds and more than 0 bronze?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"championships_per_nation\" WHERE \"gold\">2 AND \"bronze\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which rider has time of +19.751?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"250cc_classification\" WHERE \"time\"='+19.751';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which manufacturer of aprilia wth time of +1:36.557 has the highest lap?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"250cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"time\"='+1:36.557';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is time of manufacturer with grid 21?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"250cc_classification\" WHERE \"grid\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total of laps with grid of 2" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"250cc_classification\" WHERE \"grid\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest grid with time of +0.499,when laps are larger than 21?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"250cc_classification\" WHERE \"time\"='+0.499' AND \"laps\">21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total laps when manufacturer of gilera has time of 40:19.910 and grid is larger than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"250cc_classification\" WHERE \"manufacturer\"='gilera' AND \"time\"='40:19.910' AND \"grid\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_728_throw_3_times\" (\n \"1st_throw\" real,\n \"2nd_throw\" real,\n \"3rd_throw\" real,\n \"equation\" text,\n \"result\" real\n);\n\nQuestion: What is the average 1st Throw, when Result is less than 728, when 3rd Throw is \"1\", when Equation is \"0 \u00d7 9\u00b2 + 0 \u00d7 9 + 0\", and when 2nd Throw is greater than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"1st_throw\") FROM \"0_728_throw_3_times\" WHERE \"result\"<728 AND \"3rd_throw\"=1 AND \"equation\"='0 \u00d7 9\u00b2 + 0 \u00d7 9 + 0' AND \"2nd_throw\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_728_throw_3_times\" (\n \"1st_throw\" real,\n \"2nd_throw\" real,\n \"3rd_throw\" real,\n \"equation\" text,\n \"result\" real\n);\n\nQuestion: What is the sum of 3rd Throw, when Result is greater than 546, and when 1st Throw is less than 9?" }, { "role": "assistant", "content": "SELECT SUM(\"3rd_throw\") FROM \"0_728_throw_3_times\" WHERE \"result\">546 AND \"1st_throw\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"0_728_throw_3_times\" (\n \"1st_throw\" real,\n \"2nd_throw\" real,\n \"3rd_throw\" real,\n \"equation\" text,\n \"result\" real\n);\n\nQuestion: What is the total number of Result, when 2nd Throw is \"2\", and when 1st Throw is less than \"4\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"0_728_throw_3_times\" WHERE \"2nd_throw\"=2 AND \"1st_throw\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the time when the rank is 14?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heats\" WHERE \"rank\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: what is the rank when the time is 3:12.40?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"heats\" WHERE \"time\"='3:12.40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: what is the rank when the heat is more than 4?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"heats\" WHERE \"heat\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: what is the nationality when the heat is less than 3 and the time is 2:35.31?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"heats\" WHERE \"heat\"<3 AND \"time\"='2:35.31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: what is the name when the heat is less than 3, the rank is less than 18, the nationality is east germany and the time is 2:35.31?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"heats\" WHERE \"heat\"<3 AND \"rank\"<18 AND \"nationality\"='east germany' AND \"time\"='2:35.31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which tie number had an away team of the Tranmere Rovers?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"away_team\"='tranmere rovers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which tie number had an away team of the Tranmere Rovers?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"away_team\"='tranmere rovers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What date did the Boston Celtics play at Richfield Coliseum?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"location\"='richfield coliseum';" } ]