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 \"port_statistics\" (\n \"product\" text,\n \"2004\" text,\n \"2003\" text,\n \"2002\" text,\n \"2001\" text\n);\n\nQuestion: What is the amount of oil terminal in 2004?" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"port_statistics\" WHERE \"product\"='oil terminal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"port_statistics\" (\n \"product\" text,\n \"2004\" text,\n \"2003\" text,\n \"2002\" text,\n \"2001\" text\n);\n\nQuestion: What is the 2003 statistic for the product that had 514,000 tonnes in 2001?" }, { "role": "assistant", "content": "SELECT \"2003\" FROM \"port_statistics\" WHERE \"2001\"='514,000 tonnes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"port_statistics\" (\n \"product\" text,\n \"2004\" text,\n \"2003\" text,\n \"2002\" text,\n \"2001\" text\n);\n\nQuestion: What is the 2002 statistic for the product that had 452,000 tonnes in 2001?" }, { "role": "assistant", "content": "SELECT \"2002\" FROM \"port_statistics\" WHERE \"2001\"='452,000 tonnes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"port_statistics\" (\n \"product\" text,\n \"2004\" text,\n \"2003\" text,\n \"2002\" text,\n \"2001\" text\n);\n\nQuestion: What is the 2001 statistic for the product that had 2,360,000 tonnes in 2002?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"port_statistics\" WHERE \"2002\"='2,360,000 tonnes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"port_statistics\" (\n \"product\" text,\n \"2004\" text,\n \"2003\" text,\n \"2002\" text,\n \"2001\" text\n);\n\nQuestion: What is the 2003 statistic for general cargo?" }, { "role": "assistant", "content": "SELECT \"2003\" FROM \"port_statistics\" WHERE \"product\"='general cargo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score at MCG?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score when playing South Melbourne?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"home_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_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did the game with North Melbourne as the away team take place?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_1\" WHERE \"away_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_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: If the Away team was south melbourne what Date did they play?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_6\" 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_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: When the venue was kardinia park and the Crowd was larger than 16,437, what was the Away team score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"crowd\">'16,437' AND \"venue\"='kardinia park';" } ]
[ { "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: When the Away team scored 6.13 (49), what was the Home teams score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"away_team_score\"='6.13 (49)';" } ]
[ { "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: When the Home team of essendon is playing what is the Away team score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"home_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: I wan the date of vacancy for departure of resigned and outgoing manager of gordon wylde" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='resigned' AND \"outgoing_manager\"='gordon wylde';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: I want the replaced for date of appointment being 12 october 2007" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='12 october 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: I want the team for date of vacancy being 28 february" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='28 february';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: I want the manner of departure for date of appointment being 12 october 2007" }, { "role": "assistant", "content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='12 october 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which date was the syracuse circuit?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"non_championship_race_results\" WHERE \"circuit\"='syracuse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which date was the x gran premio di napoli?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"non_championship_race_results\" WHERE \"race_name\"='x gran premio di napoli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What report happened on 22 september?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"non_championship_race_results\" WHERE \"date\"='22 september';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which report has a Winning driver of peter collins, and a Circuit of syracuse?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"non_championship_race_results\" WHERE \"winning_driver\"='peter collins' AND \"circuit\"='syracuse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"judge\" text,\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: Who appointed Judge Edward E. Cushman?" }, { "role": "assistant", "content": "SELECT \"appointed_by\" FROM \"former_judges\" WHERE \"judge\"='edward e. cushman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"judge\" text,\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: Who was Judge Jack Edward Tanner's chief judge?" }, { "role": "assistant", "content": "SELECT \"chief_judge\" FROM \"former_judges\" WHERE \"judge\"='jack edward tanner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is the date of birth of the player that has 11 caps and plays the prop position?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"2007_rugby_world_cup_squads\" WHERE \"caps\"=11 AND \"position\"='prop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What club or province is the player with 12 caps from?" }, { "role": "assistant", "content": "SELECT \"club_province\" FROM \"2007_rugby_world_cup_squads\" WHERE \"caps\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What position does Toby Flood, who is from Newcastle and has fewer than 24 caps, play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"2007_rugby_world_cup_squads\" WHERE \"club_province\"='newcastle' AND \"caps\"<24 AND \"player\"='toby flood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"cup_final_attendance\" text\n);\n\nQuestion: Which team beat the Newcastle Breakers?" }, { "role": "assistant", "content": "SELECT \"winning_team\" FROM \"nsl_cup_winners\" WHERE \"losing_team\"='newcastle breakers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"cup_final_attendance\" text\n);\n\nQuestion: What team lost on 20 August 1989?" }, { "role": "assistant", "content": "SELECT \"losing_team\" FROM \"nsl_cup_winners\" WHERE \"cup_final_date\"='20 august 1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"cup_final_attendance\" text\n);\n\nQuestion: On what date did the Brisbane Lions (1) win?" }, { "role": "assistant", "content": "SELECT \"cup_final_date\" FROM \"nsl_cup_winners\" WHERE \"winning_team\"='brisbane lions (1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"cup_final_attendance\" text\n);\n\nQuestion: What was the winning team with the 8,132 final attendance?" }, { "role": "assistant", "content": "SELECT \"winning_team\" FROM \"nsl_cup_winners\" WHERE \"cup_final_attendance\"='8,132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance on August 2?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='august 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date where the attendance was 31,220?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='31,220';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the team's record on August 4?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='august 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date when the attendance was 48,041?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='48,041';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who are the finals opponents for the match with partner Ricardo Hocevar?" }, { "role": "assistant", "content": "SELECT \"opponents_in_the_final\" FROM \"doubles_12\" WHERE \"partnering\"='ricardo hocevar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who were the opponents of the final on June 23, 2003?" }, { "role": "assistant", "content": "SELECT \"opponents_in_the_final\" FROM \"doubles_12\" WHERE \"date\"='june 23, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home side at glenferrie oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_21\" WHERE \"venue\"='glenferrie oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people attended the game with the home side scoring 18.14 (122)?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_21\" WHERE \"home_team_score\"='18.14 (122)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1998\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who is the author of Episode 38 (16)?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"season_2_1998\" WHERE \"episode_num\"='38 (16)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1998\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: When did Episode 29 (7) originally air?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"season_2_1998\" WHERE \"episode_num\"='29 (7)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1998\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who directed the episode \"Approaching Zero\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"season_2_1998\" WHERE \"title\"='\\\"approaching zero\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1998\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the episode # of the episode that aired on April 5, 1998?" }, { "role": "assistant", "content": "SELECT \"episode_num\" FROM \"season_2_1998\" WHERE \"original_airdate\"='april 5, 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_1998\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who wrote the episode that originally aired on March 1, 1998?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"season_2_1998\" WHERE \"original_airdate\"='march 1, 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text\n);\n\nQuestion: what tournament has 2000 of 3r?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2000\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text\n);\n\nQuestion: what 2001 has 1991 of 4r?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"1991\"='4r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_performance_timeline\" (\n \"tournament\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text\n);\n\nQuestion: what 1989 has 2002 of 4r and 2005 of 4r?" }, { "role": "assistant", "content": "SELECT \"1989\" FROM \"grand_slam_singles_performance_timeline\" WHERE \"2002\"='4r' AND \"2005\"='4r';" } ]
[ { "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 team played in front of 28,536 at an away stadium?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"crowd\">'28,536';" } ]
[ { "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 Fitzroy score at their home stadium?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"home_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: When did an away team score 12.14 (86) against a home team with 15.10 (100)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" WHERE \"away_team_score\"='12.14 (86)' AND \"home_team_score\"='15.10 (100)';" } ]
[ { "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: Who faced off against St Kilda at their home?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"home_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: Where did a home team score 15.14 (104)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_4\" WHERE \"home_team_score\"='15.14 (104)';" } ]
[ { "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: When did an away team score 12.14 (86) at Windy Hill?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" WHERE \"away_team_score\"='12.14 (86)' AND \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the low number of top 25s in an event with over 15 appearances?" }, { "role": "assistant", "content": "SELECT MIN(\"top_25\") FROM \"summary\" WHERE \"events\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_opening_day_gross\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_day_net_gross\" real,\n \"day_of_week\" text\n);\n\nQuestion: What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"biggest_opening_day_gross\" WHERE \"day_of_week\"='wednesday' AND \"year\"<2012 AND \"studio_s\"='reliance entertainment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_opening_day_gross\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_day_net_gross\" real,\n \"day_of_week\" text\n);\n\nQuestion: What is the opening day of the week of Chennai Express, which had an opening day net gross larger than 14,76,00,000 in 2013?" }, { "role": "assistant", "content": "SELECT \"day_of_week\" FROM \"biggest_opening_day_gross\" WHERE \"opening_day_net_gross\">'14,76,00,000' AND \"year\"=2013 AND \"movie\"='chennai express';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_opening_day_gross\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_day_net_gross\" real,\n \"day_of_week\" text\n);\n\nQuestion: What is the opening day net gross a Reliance Entertainment movie before 2011 had?" }, { "role": "assistant", "content": "SELECT SUM(\"opening_day_net_gross\") FROM \"biggest_opening_day_gross\" WHERE \"studio_s\"='reliance entertainment' AND \"year\"<2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_opening_day_gross\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_day_net_gross\" real,\n \"day_of_week\" text\n);\n\nQuestion: What is the studio of ra.one?" }, { "role": "assistant", "content": "SELECT \"studio_s\" FROM \"biggest_opening_day_gross\" WHERE \"movie\"='ra.one';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_opening_day_gross\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_day_net_gross\" real,\n \"day_of_week\" text\n);\n\nQuestion: What is the year of the movie with an opening day on Friday with a rank 10?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"biggest_opening_day_gross\" WHERE \"day_of_week\"='friday' AND \"rank\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: What is the lowest Sack with a Solo of 24, with Tackles larger than 25.5, with Yards larger than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"sack\") FROM \"defense\" WHERE \"solo\"=24 AND \"tackles\">25.5 AND \"yards\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: What is the total number of Solo with a Player with sean mcinerney, and Yards larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"solo\") FROM \"defense\" WHERE \"player\"='sean mcinerney' AND \"yards\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: What is the highest Sack with an Assisted larger than 4, with TD's smaller than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"sack\") FROM \"defense\" WHERE \"assisted\">4 AND \"td_s\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"projects_in_india\" (\n \"power_plant\" text,\n \"producer\" text,\n \"location\" text,\n \"state\" text,\n \"total_capacity_m_we\" real\n);\n\nQuestion: At the power plant located in ramakkalmedu, what is the sum of the total capacity (MWe)?" }, { "role": "assistant", "content": "SELECT SUM(\"total_capacity_m_we\") FROM \"projects_in_india\" WHERE \"power_plant\"='ramakkalmedu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"projects_in_india\" (\n \"power_plant\" text,\n \"producer\" text,\n \"location\" text,\n \"state\" text,\n \"total_capacity_m_we\" real\n);\n\nQuestion: What company is the producer in the chennai mohan power plant?" }, { "role": "assistant", "content": "SELECT \"producer\" FROM \"projects_in_india\" WHERE \"power_plant\"='chennai mohan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"projects_in_india\" (\n \"power_plant\" text,\n \"producer\" text,\n \"location\" text,\n \"state\" text,\n \"total_capacity_m_we\" real\n);\n\nQuestion: What company is the producer at the poolavadi location" }, { "role": "assistant", "content": "SELECT \"producer\" FROM \"projects_in_india\" WHERE \"location\"='poolavadi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"projects_in_india\" (\n \"power_plant\" text,\n \"producer\" text,\n \"location\" text,\n \"state\" text,\n \"total_capacity_m_we\" real\n);\n\nQuestion: What company is known as the producer at the kethanur location?" }, { "role": "assistant", "content": "SELECT \"producer\" FROM \"projects_in_india\" WHERE \"location\"='kethanur';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 18.11 (119)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_22\" WHERE \"away_team_score\"='18.11 (119)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 scored 18.11 (119)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_22\" WHERE \"home_team_score\"='18.11 (119)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_test_flights\" (\n \"flight_designation\" text,\n \"date\" text,\n \"duration\" text,\n \"pilot_co_pilot\" text,\n \"feathered_fxx\" text\n);\n\nQuestion: When the duration was 11 min, 34 sec, what was the feathered (Fxx)?" }, { "role": "assistant", "content": "SELECT \"feathered_fxx\" FROM \"list_of_test_flights\" WHERE \"duration\"='11 min, 34 sec';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"uncials_with_sigla\" (\n \"sign\" text,\n \"name\" text,\n \"date\" text,\n \"content\" text,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: I want to know the city for guelferbytanus b and the 5th" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"uncials_with_sigla\" WHERE \"date\"='5th' AND \"name\"='guelferbytanus b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"uncials_with_sigla\" (\n \"sign\" text,\n \"name\" text,\n \"date\" text,\n \"content\" text,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Name the country for the 9th and sign of g e" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"uncials_with_sigla\" WHERE \"date\"='9th' AND \"sign\"='g e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"uncials_with_sigla\" (\n \"sign\" text,\n \"name\" text,\n \"date\" text,\n \"content\" text,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Name the content for sign of g e" }, { "role": "assistant", "content": "SELECT \"content\" FROM \"uncials_with_sigla\" WHERE \"sign\"='g e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"uncials_with_sigla\" (\n \"sign\" text,\n \"name\" text,\n \"date\" text,\n \"content\" text,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Name the city for athous lavrensis" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"uncials_with_sigla\" WHERE \"name\"='athous lavrensis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"race_name\" text,\n \"dist_miles\" text,\n \"course\" text,\n \"prize\" text,\n \"odds\" text,\n \"runners\" real,\n \"place\" real,\n \"runner_up\" text\n);\n\nQuestion: Which race had a distance of 4 miles where the runner-up was not known?" }, { "role": "assistant", "content": "SELECT \"race_name\" FROM \"summary\" WHERE \"dist_miles\"='4' AND \"runner_up\"='not known';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What date did the Jazz play the Bulls at home?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"home\"='jazz' AND \"visitor\"='bulls';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: On February 26, who was the leading scorer?" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"february\" WHERE \"date\"='february 26';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What's the record of Carlos Boozer (23) as the leading scorer?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"february\" WHERE \"leading_scorer\"='carlos boozer (23)';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What date was Carlos Boozer (23) the leading scorer?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"leading_scorer\"='carlos boozer (23)';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who was the leading scorer on February 9?" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"february\" WHERE \"date\"='february 9';" } ]
[ { "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 \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: While the Hornets were visiting, what date was Deron Williams (29) the leading scorer?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"february\" WHERE \"leading_scorer\"='deron williams (29)' AND \"visitor\"='hornets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"minesweepers\" (\n \"class\" text,\n \"ships_in_class\" text,\n \"pennant_number\" real,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: Tell me the ships in classs for kuha class" }, { "role": "assistant", "content": "SELECT \"ships_in_class\" FROM \"minesweepers\" WHERE \"class\"='kuha class';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many grids have a Constructor of talbot-lago - talbot, a Laps under 83, and a driver of johnny claes?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"constructor\"='talbot-lago - talbot' AND \"laps\"<83 AND \"driver\"='johnny claes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the away team is Geelong, what is the highest crowd count?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_9\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the total crowd count for the venue Princes Park?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_9\" 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 \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: For the away team with a score of 16.13 (109), what is the total crowd count?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_9\" WHERE \"away_team_score\"='16.13 (109)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"navy\" text,\n \"name\" text,\n \"pennant\" text,\n \"commissioned\" real,\n \"home_port\" text\n);\n\nQuestion: What is the home port of m40?" }, { "role": "assistant", "content": "SELECT \"home_port\" FROM \"ships\" WHERE \"pennant\"='m40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"navy\" text,\n \"name\" text,\n \"pennant\" text,\n \"commissioned\" real,\n \"home_port\" text\n);\n\nQuestion: What is the navy for middleton with a home port of portsmouth after 1983?" }, { "role": "assistant", "content": "SELECT \"navy\" FROM \"ships\" WHERE \"home_port\"='portsmouth' AND \"commissioned\">1983 AND \"name\"='middleton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_1482_1678\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"date_of_death\" text,\n \"reign\" text,\n \"relationship_with_predecessor\" text\n);\n\nQuestion: When did Charles III die?" }, { "role": "assistant", "content": "SELECT \"date_of_death\" FROM \"house_of_habsburg_1482_1678\" WHERE \"name\"='charles iii';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the fastest lap of the race where Giuseppe Farina was the winning driver?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"season_review\" WHERE \"winning_driver\"='giuseppe farina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the report status of the race with Ferrari as the constructor and a monza circuit?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"season_review\" WHERE \"constructor\"='ferrari' AND \"circuit\"='monza';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the constructor of the race with Juan Manuel Fangio as the fastest lap and Giuseppe Farina as the winning driver?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"season_review\" WHERE \"fastest_lap\"='juan manuel fangio' AND \"winning_driver\"='giuseppe farina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Who was the winning driver of the British Grand Prix where Giuseppe Farina had the fastest lap?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"fastest_lap\"='giuseppe farina' AND \"race\"='british grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the race that had a tyre of p and Juan Manuel Fangio as the winning driver?" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"season_review\" WHERE \"tyre\"='p' AND \"winning_driver\"='juan manuel fangio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1893_1900\" (\n \"class\" text,\n \"type\" text,\n \"quantity\" real,\n \"date\" text,\n \"lner_class\" text\n);\n\nQuestion: What is the Quantity of Type 2-4-2t?" }, { "role": "assistant", "content": "SELECT SUM(\"quantity\") FROM \"1893_1900\" WHERE \"type\"='2-4-2t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1893_1900\" (\n \"class\" text,\n \"type\" text,\n \"quantity\" real,\n \"date\" text,\n \"lner_class\" text\n);\n\nQuestion: What was the Quantity on Date 1900?" }, { "role": "assistant", "content": "SELECT SUM(\"quantity\") FROM \"1893_1900\" WHERE \"date\"='1900';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1893_1900\" (\n \"class\" text,\n \"type\" text,\n \"quantity\" real,\n \"date\" text,\n \"lner_class\" text\n);\n\nQuestion: What is the Quantity of type 2-4-2t?" }, { "role": "assistant", "content": "SELECT COUNT(\"quantity\") FROM \"1893_1900\" WHERE \"type\"='2-4-2t';" } ]
[ { "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 \"constructor\" text,\n \"qual\" real,\n \"rank\" real,\n \"laps\" real,\n \"time_retired\" text\n);\n\nQuestion: What is the smallest grid with a Time/Retired of engine, and a qual of less than 138.75?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"time_retired\"='engine' AND \"qual\"<138.75;" } ]
[ { "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 \"constructor\" text,\n \"qual\" real,\n \"rank\" real,\n \"laps\" real,\n \"time_retired\" text\n);\n\nQuestion: What laps have a rank larger than 13 and the Time/Retired is accident, and a Qual smaller than 136.98?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"classification\" WHERE \"rank\">13 AND \"time_retired\"='accident' AND \"qual\"<136.98;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What position is Sal Martinez?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"2011_team\" WHERE \"player\"='sal martinez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chimney_bombs\" (\n \"fire_class\" text,\n \"geometric_symbol\" text,\n \"intended_use\" text,\n \"mnemonic\" text,\n \"compatibility\" text\n);\n\nQuestion: What is the compatibility for the Mnemonic d for \"dynamite\"?" }, { "role": "assistant", "content": "SELECT \"compatibility\" FROM \"chimney_bombs\" WHERE \"mnemonic\"='d for \\\"dynamite\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed the car that has a Time/Retired of +2:06.0?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"classification\" WHERE \"time_retired\"='+2:06.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lap total for the grid under 15 that retired due to transmission?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"grid\"<15 AND \"time_retired\"='transmission';" } ]