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 \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Tell me the away team score for away team of south melbourne" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" 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_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: I want to know the away team score for vfl park venue" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"venue\"='vfl park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Name the total number of tracks for of the fallen angel" }, { "role": "assistant", "content": "SELECT COUNT(\"track\") FROM \"track_listing\" WHERE \"translation\"='the fallen angel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What driver went 14 rounds with a 193 Chassis?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='193' AND \"rounds\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What engine was used when Aguri Suzuki drove the FA13B FA14 Chassis?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='fa13b fa14' AND \"driver\"='aguri suzuki';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who was the entrant for all the round with Jean Alesi?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"drivers_and_constructors\" WHERE \"rounds\"='all' AND \"driver\"='jean alesi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What engine did Riccardo Patrese use?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"driver\"='riccardo patrese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 home team was footscray which venue did they play it?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_12\" WHERE \"home_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the home team was footscray what did they score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"home_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\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 north melbourne was playing what did they score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"home_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the score of the September 20, 2005 match when the Opponents are FC Bayern Munich?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"results\" WHERE \"opponents\"='fc bayern munich' AND \"date\"='september 20, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the match report for July 10, 2005?" }, { "role": "assistant", "content": "SELECT \"match_report\" FROM \"results\" WHERE \"date\"='july 10, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: What is the date of the GC competition when the opponents are 1. FC Nuremberg?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"results\" WHERE \"opponents\"='1. fc nuremberg' AND \"competition\"='gc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: Which competition was held on September 10, 2005?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"results\" WHERE \"date\"='september 10, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text,\n \"match_report\" text\n);\n\nQuestion: In which competition was the score 3-0?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"results\" WHERE \"score\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visitor when the lakers were at home with a Score of 85\u2013106?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"april\" WHERE \"home\"='lakers' AND \"score\"='85\u2013106';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_debut_for_the_gee\" (\n \"debut_year\" real,\n \"player\" text,\n \"date_of_birth\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: what is the date of birth for the player with goals less than 4, games more than 1, years at club, 1945 and named jim young?" }, { "role": "assistant", "content": "SELECT \"date_of_birth\" FROM \"players_who_made_their_debut_for_the_gee\" WHERE \"goals\"<4 AND \"games\">1 AND \"years_at_club\"='1945' AND \"player\"='jim young';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_debut_for_the_gee\" (\n \"debut_year\" real,\n \"player\" text,\n \"date_of_birth\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: what is the debut year for player terry fulton with games less than 51?" }, { "role": "assistant", "content": "SELECT AVG(\"debut_year\") FROM \"players_who_made_their_debut_for_the_gee\" WHERE \"player\"='terry fulton' AND \"games\"<51;" } ]
[ { "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: How people attended Victoria Park?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_6\" WHERE \"venue\"='victoria 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: What is the away team score for South Melbourne?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" 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: Who played Melbourne as the home team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team has an attendance of more than 17,000?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"crowd\">'17,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team played at MCG?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_4\" 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_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date when Geelong was the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" WHERE \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: What is Damien Martyn's bowling style?" }, { "role": "assistant", "content": "SELECT \"bowling_style\" FROM \"australia\" WHERE \"player\"='damien martyn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: What is the batting style of the player born on 14 November 1971?" }, { "role": "assistant", "content": "SELECT \"batting_style\" FROM \"australia\" WHERE \"date_of_birth\"='14 november 1971';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"player\" text,\n \"date_of_birth\" text,\n \"batting_style\" text,\n \"bowling_style\" text,\n \"first_class_team\" text\n);\n\nQuestion: What is the first class team of the player born on 23 February 1973?" }, { "role": "assistant", "content": "SELECT \"first_class_team\" FROM \"australia\" WHERE \"date_of_birth\"='23 february 1973';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1975_2009\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"eu_council_presidency\" text,\n \"president_in_office\" text,\n \"host_city\" text\n);\n\nQuestion: What is the type for EU Council Presidency of UK and John Major as President-in-Office?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"1975_2009\" WHERE \"eu_council_presidency\"='uk' AND \"president_in_office\"='john major';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1975_2009\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"eu_council_presidency\" text,\n \"president_in_office\" text,\n \"host_city\" text\n);\n\nQuestion: In which host city was Margaret Thatcher the President-in-Office in 1981?" }, { "role": "assistant", "content": "SELECT \"host_city\" FROM \"1975_2009\" WHERE \"president_in_office\"='margaret thatcher' AND \"year\"=1981;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"country\" text,\n \"preliminaries\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: How many average scores have preliminary scores over 9.25, interview scores more than 9.44, and evening gown scores of 9.77?" }, { "role": "assistant", "content": "SELECT COUNT(\"average\") FROM \"final_competition_scores\" WHERE \"preliminaries\">9.25 AND \"interview\">9.44 AND \"evening_gown\"=9.77;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"country\" text,\n \"preliminaries\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the least score for interview with a preliminaries score less than 9.4, evening gown score less than 9.55, and swimsuit score more than 9.18 in New York?" }, { "role": "assistant", "content": "SELECT MIN(\"interview\") FROM \"final_competition_scores\" WHERE \"preliminaries\"<9.4 AND \"evening_gown\"<9.55 AND \"country\"='new york' AND \"swimsuit\">9.18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in_ordinary\" (\n \"date\" text,\n \"three\" text,\n \"four\" text,\n \"five\" text,\n \"seven\" text\n);\n\nQuestion: Name the seven for 29 november 1690" }, { "role": "assistant", "content": "SELECT \"seven\" FROM \"in_ordinary\" WHERE \"date\"='29 november 1690';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in_ordinary\" (\n \"date\" text,\n \"three\" text,\n \"four\" text,\n \"five\" text,\n \"seven\" text\n);\n\nQuestion: Name the four for 6 march 1801" }, { "role": "assistant", "content": "SELECT \"four\" FROM \"in_ordinary\" WHERE \"date\"='6 march 1801';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in_ordinary\" (\n \"date\" text,\n \"three\" text,\n \"four\" text,\n \"five\" text,\n \"seven\" text\n);\n\nQuestion: Name the three for william prewett for four and five being richard ellis with seven being nicholas king on 5 november 1693" }, { "role": "assistant", "content": "SELECT \"three\" FROM \"in_ordinary\" WHERE \"four\"='william prewett' AND \"five\"='richard ellis' AND \"seven\"='nicholas king' AND \"date\"='5 november 1693';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in_ordinary\" (\n \"date\" text,\n \"three\" text,\n \"four\" text,\n \"five\" text,\n \"seven\" text\n);\n\nQuestion: Name the three for 16 december 1676" }, { "role": "assistant", "content": "SELECT \"three\" FROM \"in_ordinary\" WHERE \"date\"='16 december 1676';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the average Grid for driver of Luca Badoer and Laps more than 69" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"race\" WHERE \"driver\"='luca badoer' AND \"laps\">69;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fencing\" (\n \"athlete\" text,\n \"event\" text,\n \"semifinal\" text,\n \"final\" text,\n \"rank\" text\n);\n\nQuestion: What final was Farhad Rezaei in?" }, { "role": "assistant", "content": "SELECT \"final\" FROM \"fencing\" WHERE \"athlete\"='farhad rezaei';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fencing\" (\n \"athlete\" text,\n \"event\" text,\n \"semifinal\" text,\n \"final\" text,\n \"rank\" text\n);\n\nQuestion: What final was ranked 4?" }, { "role": "assistant", "content": "SELECT \"final\" FROM \"fencing\" WHERE \"rank\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fencing\" (\n \"athlete\" text,\n \"event\" text,\n \"semifinal\" text,\n \"final\" text,\n \"rank\" text\n);\n\nQuestion: What was the reanking of Hamid Veisi?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"fencing\" WHERE \"athlete\"='hamid veisi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_records\" (\n \"year\" real,\n \"franchise\" text,\n \"league\" text,\n \"percentage\" real,\n \"finish\" text\n);\n\nQuestion: Which Franchise has a Percentage under 0.707, a Year larger than 1931, and the Finish was won 1998 World Series?" }, { "role": "assistant", "content": "SELECT \"franchise\" FROM \"season_records\" WHERE \"percentage\"<0.707 AND \"year\">1931 AND \"finish\"='won 1998 world series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_records\" (\n \"year\" real,\n \"franchise\" text,\n \"league\" text,\n \"percentage\" real,\n \"finish\" text\n);\n\nQuestion: What is the average Year for the Finish of lost 2001 alcs and the Percentage is over 0.716?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"season_records\" WHERE \"finish\"='lost 2001 alcs' AND \"percentage\">0.716;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_records\" (\n \"year\" real,\n \"franchise\" text,\n \"league\" text,\n \"percentage\" real,\n \"finish\" text\n);\n\nQuestion: In the Year 1939, what was the Finish when Al was the League?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"season_records\" WHERE \"league\"='al' AND \"year\"=1939;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_records\" (\n \"year\" real,\n \"franchise\" text,\n \"league\" text,\n \"percentage\" real,\n \"finish\" text\n);\n\nQuestion: What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"season_records\" WHERE \"league\"='nl' AND \"percentage\"<0.726 AND \"year\">1897 AND \"franchise\"='pittsburgh pirates';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue when the home team was footscray?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_14\" WHERE \"home_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd when the away team was hawthorn?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_14\" WHERE \"away_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girone_b\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2011_12_season\" text\n);\n\nQuestion: What city houses the Ciro Vigorito stadium?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"girone_b\" WHERE \"stadium\"='ciro vigorito';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: I want to know the highest silver for total of 4 for poland and gold less than 1" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"total\"=4 AND \"nation\"='poland' AND \"gold\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the average silver for total more than 1 with bronze of 2 for france and gold more than 0" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"total\">1 AND \"bronze\"=2 AND \"nation\"='france' AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the number of gold for albania with a silver of 1 and total less than 1" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"silver\"=1 AND \"nation\"='albania' AND \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the average gold for moldova and bronze less than 1" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='moldova' AND \"bronze\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the sum of gold for bronze less than 0" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_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 tyre was used in the Zandvoort circuit?" }, { "role": "assistant", "content": "SELECT \"tyre\" FROM \"world_championship_season_review\" WHERE \"circuit\"='zandvoort';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_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: Which circuit did Alberto Ascari set the fastest lap time with a Ferrari?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"world_championship_season_review\" WHERE \"constructor\"='ferrari' AND \"fastest_lap\"='alberto ascari';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_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 won the race with a Ferrari, were Luigi Villoresi set the fastest lap time?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"world_championship_season_review\" WHERE \"constructor\"='ferrari' AND \"fastest_lap\"='luigi villoresi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_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: Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"world_championship_season_review\" WHERE \"pole_position\"='alberto ascari' AND \"winning_driver\"='alberto ascari' AND \"fastest_lap\"='luigi villoresi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text\n);\n\nQuestion: Which county is named broderick wood products?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"superfund_sites\" WHERE \"name\"='broderick wood products';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text\n);\n\nQuestion: What construction completed is named nelson tunnel/commodore waste rock?" }, { "role": "assistant", "content": "SELECT \"construction_completed\" FROM \"superfund_sites\" WHERE \"name\"='nelson tunnel/commodore waste rock';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text\n);\n\nQuestion: What is the ID of marshall landfill on 09/08/1983?" }, { "role": "assistant", "content": "SELECT \"cerclis_id\" FROM \"superfund_sites\" WHERE \"listed\"='09/08/1983' AND \"name\"='marshall landfill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"outcome\" text\n);\n\nQuestion: Which nominee won the award for Fourth Best Indian Film?" }, { "role": "assistant", "content": "SELECT \"nominee\" FROM \"awards\" WHERE \"outcome\"='won' AND \"category\"='fourth best indian film';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"outcome\" text\n);\n\nQuestion: In which ceremony was Harnam Singh Rawail nominated for an award?" }, { "role": "assistant", "content": "SELECT \"ceremony\" FROM \"awards\" WHERE \"nominee\"='harnam singh rawail';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"outcome\" text\n);\n\nQuestion: In which ceremony was Jayant nominated for an award?" }, { "role": "assistant", "content": "SELECT \"ceremony\" FROM \"awards\" WHERE \"nominee\"='jayant';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_8\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What surface was the April 24, 2003 match played on?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_18_8\" WHERE \"date\"='april 24, 2003';" } ]
[ { "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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many times has Watney made the top 25 for a tournament in which he as also been cut 6 times?" }, { "role": "assistant", "content": "SELECT SUM(\"top_25\") FROM \"summary\" WHERE \"cuts_made\"=6;" } ]
[ { "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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which tournament has the highest number of cuts while also having 4 top 25 appearances?" }, { "role": "assistant", "content": "SELECT MAX(\"cuts_made\") FROM \"summary\" WHERE \"top_25\"=4;" } ]
[ { "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: What is the smallest grid with collision as the Time/Retired for pedro diniz?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"time_retired\"='collision' AND \"driver\"='pedro diniz';" } ]
[ { "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: What is the number of laps for Grid 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"grid\"=14;" } ]
[ { "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: What is the number of the grid for mika h\u00e4kkinen and more than 45 laps?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='mika h\u00e4kkinen' AND \"laps\">45;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team has more than 19,000 spectators?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"crowd\">'19,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_floral_collection\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"finish\" text,\n \"issue_price\" text,\n \"total_mintage\" real\n);\n\nQuestion: What is the Theme of Christie Paquet after 2004 with an Issue Price of $34.95?" }, { "role": "assistant", "content": "SELECT \"theme\" FROM \"canadian_floral_collection\" WHERE \"artist\"='christie paquet' AND \"issue_price\"='$34.95' AND \"year\">2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_floral_collection\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"finish\" text,\n \"issue_price\" text,\n \"total_mintage\" real\n);\n\nQuestion: What is the Year of Christie Paquet with Issue Price of $34.95?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"canadian_floral_collection\" WHERE \"artist\"='christie paquet' AND \"issue_price\"='$34.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the Crowd for the Venue of Princes Park?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_16\" 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_16\" (\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 Home team score for the Home team of Melbourne?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"home_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 Home team score for the Home team from South Melbourne?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_16\" 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_16\" (\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 Away team has a Home team score of 18.12 (120)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"home_team_score\"='18.12 (120)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 Home team score for the Venue named MCG?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: Who has the lowest earnings that has a rank smaller than 2?" }, { "role": "assistant", "content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the average rank of someone who earned smaller than 3,069,633?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"leaders\" WHERE \"earnings\"<'3,069,633';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What has the average wins in Australia who earned smaller than 3,133,913?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"leaders\" WHERE \"country\"='australia' AND \"earnings\"<'3,133,913';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What was the total number of wins with player Mike Hill with a rank bigger than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"leaders\" WHERE \"rank\">2 AND \"player\"='mike hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championship_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Where was the argentine grand prix?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"championship_review\" WHERE \"race\"='argentine grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championship_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the constructor for the fastest nelson piquet?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"championship_review\" WHERE \"fastest_lap\"='nelson piquet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championship_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the constructor for zolder" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"championship_review\" WHERE \"location\"='zolder';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"championship_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the constructor for 10 august" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"championship_review\" WHERE \"date\"='10 august';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_debut_for_the_gee\" (\n \"debut_year\" real,\n \"player\" text,\n \"date_of_birth\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: What is the number of Years at Club for the player who has had more games than 28, more Goals than 225, and his Debut year was after 1950?" }, { "role": "assistant", "content": "SELECT \"years_at_club\" FROM \"players_who_made_their_debut_for_the_gee\" WHERE \"games\">28 AND \"goals\">225 AND \"debut_year\">1950;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_debut_for_the_gee\" (\n \"debut_year\" real,\n \"player\" text,\n \"date_of_birth\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: What is the birthday of the player who has Years at Club of 1951?" }, { "role": "assistant", "content": "SELECT \"date_of_birth\" FROM \"players_who_made_their_debut_for_the_gee\" WHERE \"years_at_club\"='1951';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_composition\" (\n \"name\" text,\n \"rank\" text,\n \"years_until_mandatory_retirement\" text,\n \"appointed_by\" text,\n \"year_appointed\" real\n);\n\nQuestion: what rank has years until mandatory retirement of 6 years?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"current_composition\" WHERE \"years_until_mandatory_retirement\"='6 years';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_composition\" (\n \"name\" text,\n \"rank\" text,\n \"years_until_mandatory_retirement\" text,\n \"appointed_by\" text,\n \"year_appointed\" real\n);\n\nQuestion: what name has an appointed year of 2009 and years until mandatory retirement of 13 years?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"current_composition\" WHERE \"year_appointed\"=2009 AND \"years_until_mandatory_retirement\"='13 years';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Which player from Oregon used the number 12?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"j\" WHERE \"no_s\"='12' AND \"school_club_team_country\"='oregon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What position does the player who is 6-10 play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"j\" WHERE \"height_in_ft\"='6-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What are the numbers for any players from Washington?" }, { "role": "assistant", "content": "SELECT \"no_s\" FROM \"j\" WHERE \"school_club_team_country\"='washington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Which years did the Rockets number 6 play?" }, { "role": "assistant", "content": "SELECT \"years_for_rockets\" FROM \"j\" WHERE \"no_s\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"senior_2nd_viii\" text,\n \"senior_3rd_viii\" text,\n \"senior_iv\" text,\n \"year_12_single_scull\" text,\n \"year_11_single_scull\" text\n);\n\nQuestion: Which 2nd senior VIII that also has a 4th senior stm?" }, { "role": "assistant", "content": "SELECT \"senior_2nd_viii\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"senior_iv\"='stm';" } ]
[ { "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: How many laps did John Love have on a grid less than 11?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"classification\" WHERE \"grid\"<11 AND \"driver\"='john love';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hebburn_line_locomotives\" (\n \"locomotive\" text,\n \"type\" text,\n \"builder\" text,\n \"builder_s_no\" text,\n \"built\" real,\n \"entered_service\" real,\n \"withdrawn\" real\n);\n\nQuestion: What is the Builder of Locomotive 2?" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"hebburn_line_locomotives\" WHERE \"locomotive\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hebburn_line_locomotives\" (\n \"locomotive\" text,\n \"type\" text,\n \"builder\" text,\n \"builder_s_no\" text,\n \"built\" real,\n \"entered_service\" real,\n \"withdrawn\" real\n);\n\nQuestion: With a Type of 4-6-4t, what is the sum Withdrawn?" }, { "role": "assistant", "content": "SELECT SUM(\"withdrawn\") FROM \"hebburn_line_locomotives\" WHERE \"type\"='4-6-4t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score from the game where Dallas played Home and Edmonton was visiting?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"december\" WHERE \"home\"='dallas' AND \"visitor\"='edmonton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"holiday_coin_set\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" real\n);\n\nQuestion: What was the mintage when the theme was Santa Claus?" }, { "role": "assistant", "content": "SELECT \"mintage\" FROM \"holiday_coin_set\" WHERE \"theme\"='santa claus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"holiday_coin_set\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" real\n);\n\nQuestion: What was the issue price in the year 2008?" }, { "role": "assistant", "content": "SELECT SUM(\"issue_price\") FROM \"holiday_coin_set\" WHERE \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"crystal_snowflake\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the earliest year when the composition is 99.99% silver and the issue price is $94.95?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"crystal_snowflake\" WHERE \"composition\"='99.99% silver' AND \"issue_price\"='$94.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"crystal_snowflake\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"composition\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What year had an issue price of $94.95 and theme of Amethyst crystal?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"crystal_snowflake\" WHERE \"issue_price\"='$94.95' AND \"theme\"='amethyst crystal';" } ]