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_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What college has Chito Victolero?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_2\" WHERE \"player\"='chito victolero';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What college has Jojo Manalo?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_2\" WHERE \"player\"='jojo manalo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the pick number for the College of Perpetual help with the Coca-Cola Tigers as a PBA team?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"round_2\" WHERE \"college\"='perpetual help' AND \"pba_team\"='coca-cola tigers';" } ]
[ { "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 score of the game on May 5?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='may 5';" } ]
[ { "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 record of the game with 18,084 in attendance?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='18,084';" } ]
[ { "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 record of the game on May 30?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Who won third place in the Zurich Tournament?" }, { "role": "assistant", "content": "SELECT \"third_place\" FROM \"2012\" WHERE \"tournament\"='zurich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Who was the winner with a score of 7\u20136 (7\u20133) , 2\u20136, [10\u20136]?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"2012\" WHERE \"score\"='7\u20136 (7\u20133) , 2\u20136, [10\u20136]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Which tournament did Thomas Enqvist win?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"2012\" WHERE \"winner\"='thomas enqvist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Which tournament was Tim Henman the runner-up in?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"2012\" WHERE \"runner_up\"='tim henman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_partnerships_of_the_tournament\" (\n \"runs\" text,\n \"wicket\" text,\n \"partnerships\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the venue where 153 runs were scored?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"highest_partnerships_of_the_tournament\" WHERE \"runs\"='153';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_partnerships_of_the_tournament\" (\n \"runs\" text,\n \"wicket\" text,\n \"partnerships\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the partnership in the game with 166* runs and an opponent of Namibia?" }, { "role": "assistant", "content": "SELECT \"partnerships\" FROM \"highest_partnerships_of_the_tournament\" WHERE \"versus\"='namibia' AND \"runs\"='166*';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_partnerships_of_the_tournament\" (\n \"runs\" text,\n \"wicket\" text,\n \"partnerships\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the date of the game against South Africa and 2nd wickets?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"highest_partnerships_of_the_tournament\" WHERE \"versus\"='south africa' AND \"wicket\"='2nd';" } ]
[ { "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: Who was the Away team that played at Carlton on 11 June 1966?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_8\" WHERE \"date\"='11 june 1966' AND \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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 was the smallest crowd at a home game of carlton?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"publication_history\" (\n \"year\" text,\n \"language\" text,\n \"title\" text,\n \"translator\" text,\n \"company\" text,\n \"pages\" real\n);\n\nQuestion: What's the title for year n.m.?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"publication_history\" WHERE \"year\"='n.m.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"publication_history\" (\n \"year\" text,\n \"language\" text,\n \"title\" text,\n \"translator\" text,\n \"company\" text,\n \"pages\" real\n);\n\nQuestion: What is the language for translators ritah meltser and amatsyah porat?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"publication_history\" WHERE \"translator\"='ritah meltser and amatsyah porat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"publication_history\" (\n \"year\" text,\n \"language\" text,\n \"title\" text,\n \"translator\" text,\n \"company\" text,\n \"pages\" real\n);\n\nQuestion: What's the fewest number of pages for the title al-jiniral fi matahatihi?" }, { "role": "assistant", "content": "SELECT MIN(\"pages\") FROM \"publication_history\" WHERE \"title\"='al-jiniral fi matahatihi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"allied_ships\" (\n \"date\" text,\n \"name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"sunk_by\" text\n);\n\nQuestion: What is the date for Zouave?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"allied_ships\" WHERE \"name\"='zouave';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"allied_ships\" (\n \"date\" text,\n \"name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"sunk_by\" text\n);\n\nQuestion: What is the date where the tonnage is larger than 5,754 and the ship was sunk by U-305?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"allied_ships\" WHERE \"tonnage_grt\">'5,754' AND \"sunk_by\"='u-305';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"allied_ships\" (\n \"date\" text,\n \"name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"sunk_by\" text\n);\n\nQuestion: What is the date for the name of Granville?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"allied_ships\" WHERE \"name\"='granville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"allied_ships\" (\n \"date\" text,\n \"name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"sunk_by\" text\n);\n\nQuestion: What is the name of the ship sunk by U-305 on 17 March 1943?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"allied_ships\" WHERE \"date\"='17 march 1943' AND \"sunk_by\"='u-305';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: Which date's visitor was jazz, when the leading scorer was Mehmet Okur (22)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"april\" WHERE \"visitor\"='jazz' AND \"leading_scorer\"='mehmet okur (22)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_the_triple_crowns_achieved\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: What Club has Fiba European Champion's Cup and an Italian Cup?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"all_the_triple_crowns_achieved\" WHERE \"european_cup\"='fiba european champion''s cup' AND \"national_cup\"='italian cup';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_the_triple_crowns_achieved\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: What European Cup is in Israeli Premier League?" }, { "role": "assistant", "content": "SELECT \"european_cup\" FROM \"all_the_triple_crowns_achieved\" WHERE \"national_league\"='israeli premier league';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_the_triple_crowns_achieved\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: Which season is Euroleague with Greek Cup?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"all_the_triple_crowns_achieved\" WHERE \"european_cup\"='euroleague' AND \"national_cup\"='greek cup';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_the_triple_crowns_achieved\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: Which European Cup is in the 1990-91 season?" }, { "role": "assistant", "content": "SELECT \"european_cup\" FROM \"all_the_triple_crowns_achieved\" WHERE \"season\"='1990-91';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_the_triple_crowns_achieved\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: Which European Cup is in the 2006-07 season?" }, { "role": "assistant", "content": "SELECT \"european_cup\" FROM \"all_the_triple_crowns_achieved\" WHERE \"season\"='2006-07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_the_triple_crowns_achieved\" (\n \"season\" text,\n \"club\" text,\n \"national_league\" text,\n \"national_cup\" text,\n \"european_cup\" text\n);\n\nQuestion: Which National League is in 1969-70 season?" }, { "role": "assistant", "content": "SELECT \"national_league\" FROM \"all_the_triple_crowns_achieved\" WHERE \"season\"='1969-70';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3001_3100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: what is the right ascension (j2000) when the apparent magnitude is 13?" }, { "role": "assistant", "content": "SELECT \"right_ascension_j2000\" FROM \"3001_3100\" WHERE \"apparent_magnitude\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3001_3100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: what is the constellation when the right ascension (j2000) is 09h51m54.0s?" }, { "role": "assistant", "content": "SELECT \"constellation\" FROM \"3001_3100\" WHERE \"right_ascension_j2000\"='09h51m54.0s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"3001_3100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: what is the lowest apparent magnitude when the object type is spiral galaxy, the constellation is leo minor and the ngc number is more than 3021?" }, { "role": "assistant", "content": "SELECT MIN(\"apparent_magnitude\") FROM \"3001_3100\" WHERE \"object_type\"='spiral galaxy' AND \"constellation\"='leo minor' AND \"ngc_number\">3021;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the total number of Draws when goals for is 58 and losses is 12 when goal differences is less than 21" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"final_table\" WHERE \"goals_for\"=58 AND \"losses\"=12 AND \"goal_difference\"<21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many goals for where there when draws are less than 11, points of is 54+16 and goals against are less than 39?" }, { "role": "assistant", "content": "SELECT COUNT(\"goals_for\") FROM \"final_table\" WHERE \"draws\"<11 AND \"points\"='54+16' AND \"goals_against\"<39;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the total number of played when points of is 31-7, position is 16 and goals for is less than 35" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"final_table\" WHERE \"points\"='31-7' AND \"position\"=16 AND \"goals_for\"<35;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the total number of goal difference when the position is more than 20" }, { "role": "assistant", "content": "SELECT COUNT(\"goal_difference\") FROM \"final_table\" WHERE \"position\">20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the sum of draws when the position is less than 17 and wins is less than 11" }, { "role": "assistant", "content": "SELECT SUM(\"draws\") FROM \"final_table\" WHERE \"position\"<17 AND \"wins\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season\" text,\n \"number_of_seasons\" real,\n \"first_season_of_current_spell\" real,\n \"titles\" real,\n \"last_title\" text\n);\n\nQuestion: what is the first season of current spell when the number of seasons is more than 72 and the position in 2012 4th?" }, { "role": "assistant", "content": "SELECT SUM(\"first_season_of_current_spell\") FROM \"clubs\" WHERE \"number_of_seasons\">72 AND \"position_in_2012\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season\" text,\n \"number_of_seasons\" real,\n \"first_season_of_current_spell\" real,\n \"titles\" real,\n \"last_title\" text\n);\n\nQuestion: what is the most number of season when the position in 2012 10th and the first season of current spell after 2004?" }, { "role": "assistant", "content": "SELECT MAX(\"number_of_seasons\") FROM \"clubs\" WHERE \"position_in_2012\"='10th' AND \"first_season_of_current_spell\">2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season\" text,\n \"number_of_seasons\" real,\n \"first_season_of_current_spell\" real,\n \"titles\" real,\n \"last_title\" text\n);\n\nQuestion: what is the position is 2012 when the last title is n/a and the first season is 2011?" }, { "role": "assistant", "content": "SELECT \"position_in_2012\" FROM \"clubs\" WHERE \"last_title\"='n/a' AND \"first_season\"='2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"position_in_2012\" text,\n \"first_season\" text,\n \"number_of_seasons\" real,\n \"first_season_of_current_spell\" real,\n \"titles\" real,\n \"last_title\" text\n);\n\nQuestion: what is the last title when the titles is more than 12 and the position in 2012 is 7th" }, { "role": "assistant", "content": "SELECT \"last_title\" FROM \"clubs\" WHERE \"titles\">12 AND \"position_in_2012\"='7th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"total\" real\n);\n\nQuestion: What is the rank number for a placing of 28.5 and a total less than 92.7?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"pairs\" WHERE \"placings\"='28.5' AND \"total\"<92.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"total\" real\n);\n\nQuestion: What is the placing value for a total less than 96.07 in the United States?" }, { "role": "assistant", "content": "SELECT \"placings\" FROM \"pairs\" WHERE \"total\"<96.07 AND \"nation\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"total\" real\n);\n\nQuestion: What is the total for Rank 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"pairs\" WHERE \"rank\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"total\" real\n);\n\nQuestion: What is the sum of all total values for Switzerland?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"pairs\" WHERE \"nation\"='switzerland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"total\" real\n);\n\nQuestion: What rank goes to a total of 92.7?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"pairs\" WHERE \"total\"=92.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" text,\n \"total\" real\n);\n\nQuestion: Who has a rank great than 3 and a placing of 64?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"pairs\" WHERE \"rank\">3 AND \"placings\"='64';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_all_around\" (\n \"rank\" real,\n \"team\" text,\n \"floor_exercise\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"total\" real\n);\n\nQuestion: How many Horizontal Bars have a Team of japan (jpn), and Parallel Bars smaller than 38.924?" }, { "role": "assistant", "content": "SELECT COUNT(\"horizontal_bar\") FROM \"team_all_around\" WHERE \"team\"='japan (jpn)' AND \"parallel_bars\"<38.924;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_all_around\" (\n \"rank\" real,\n \"team\" text,\n \"floor_exercise\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"total\" real\n);\n\nQuestion: How many pommel Horses have Rings of 37.461, and a Total smaller than 229.507?" }, { "role": "assistant", "content": "SELECT COUNT(\"pommel_horse\") FROM \"team_all_around\" WHERE \"rings\"=37.461 AND \"total\"<229.507;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_all_around\" (\n \"rank\" real,\n \"team\" text,\n \"floor_exercise\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of totals with a Vault of 38.437, and a Floor Exercise smaller than 37.524?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"team_all_around\" WHERE \"vault\"=38.437 AND \"floor_exercise\"<37.524;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_all_around\" (\n \"rank\" real,\n \"team\" text,\n \"floor_exercise\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"total\" real\n);\n\nQuestion: How many pommel horses have a Total smaller than 230.019, a Team of china (chn), and a Vault smaller than 38.437?" }, { "role": "assistant", "content": "SELECT COUNT(\"pommel_horse\") FROM \"team_all_around\" WHERE \"total\"<230.019 AND \"team\"='china (chn)' AND \"vault\"<38.437;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"studio\" text,\n \"director\" text\n);\n\nQuestion: What is the title where the studio was RKO, the role was Dolly, and the year was later than 1943?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"filmography\" WHERE \"year\">1943 AND \"studio\"='rko' AND \"role\"='dolly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"studio\" text,\n \"director\" text\n);\n\nQuestion: Who was the director for To Have and Have Not, earlier than 1945 with WB studio?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"filmography\" WHERE \"studio\"='wb' AND \"year\"<1945 AND \"title\"='to have and have not';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"studio\" text,\n \"director\" text\n);\n\nQuestion: What year was The Horn Blows at Midnight, directed by Raoul Walsh?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"filmography\" WHERE \"director\"='raoul walsh' AND \"title\"='the horn blows at midnight';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"studio\" text,\n \"director\" text\n);\n\nQuestion: What title was directed by Raoul Walsh later than 1945?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"filmography\" WHERE \"director\"='raoul walsh' AND \"year\">1945;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"title\" text,\n \"role\" text,\n \"studio\" text,\n \"director\" text\n);\n\nQuestion: What was the studio for The Hard Way in 1943?" }, { "role": "assistant", "content": "SELECT \"studio\" FROM \"filmography\" WHERE \"year\"=1943 AND \"title\"='the hard way';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which team plays at Lake Oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_15\" WHERE \"venue\"='lake oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away score when they played at Brunswick Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_15\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was South Melbourne played?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_15\" 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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Where week is greater than 14 and Opponent is Dallas Cowboys, what is the result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">14 AND \"opponent\"='dallas cowboys';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Where week is greater than 7 and attendance is 66,251 what is the result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">7 AND \"attendance\"='66,251';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Where attendance is 79,431 what is date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='79,431';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Where Date is september 13, 1998 what is result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='september 13, 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score at Junction oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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 average amount of spectators when the away team scored 14.7 (91)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_4\" WHERE \"away_team_score\"='14.7 (91)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score when the home team scored 13.15 (93)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"home_team_score\"='13.15 (93)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the score when the home is ny islanders and the visitor is montreal" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"home\"='ny islanders' AND \"visitor\"='montreal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the score when the decision is dipietro and the visitor is philadelphia" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"decision\"='dipietro' AND \"visitor\"='philadelphia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the score when it had a decision of dipietro and visitor of ny islanders with home of colorado" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"decision\"='dipietro' AND \"visitor\"='ny islanders' AND \"home\"='colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the least attendance with carolina visitor" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"january\" WHERE \"visitor\"='carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the Home team score when the crowd was larger than 12,240 and Carlton was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"crowd\">'12,240' AND \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What Venue had Carlton has the Away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_3\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record when Clippers have the high points?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"standings\" WHERE \"high_points\"='clippers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What had the high points when OT had high rebounds?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"standings\" WHERE \"high_rebounds\"='ot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: On what date did the Suns have high points with a record of 33\u201313?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"standings\" WHERE \"high_points\"='suns' AND \"record\"='33\u201313';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who has the high assists when location attendance is 20,562?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"standings\" WHERE \"location_attendance\"='20,562';" } ]
[ { "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: Which Bronze has a Silver smaller than 1, and a Total larger than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"total\">3;" } ]
[ { "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: Which Gold has a Nation of united states, and a Total larger than 5?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"nation\"='united states' AND \"total\">5;" } ]
[ { "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: Which Bronze has a Nation of argentina, and a Silver smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='argentina' AND \"silver\"<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: Which Bronze has a Silver of 2, and a Total smaller than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=2 AND \"total\"<5;" } ]
[ { "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: Where was the game played when the away team scored 8.14 (62)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_8\" WHERE \"away_team_score\"='8.14 (62)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest amount of spectators when the home team scored 13.11 (89)?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_8\" WHERE \"home_team_score\"='13.11 (89)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_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: How many spectators were at the away team Carlton?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_8\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_member_schools\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"boys_girls\" text,\n \"day_boarding\" text,\n \"school_colors\" text\n);\n\nQuestion: What school colors for the friends' school with over 1000 enrolled?" }, { "role": "assistant", "content": "SELECT \"school_colors\" FROM \"current_member_schools\" WHERE \"enrolment\">1000 AND \"school\"='the friends'' school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_member_schools\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"boys_girls\" text,\n \"day_boarding\" text,\n \"school_colors\" text\n);\n\nQuestion: What is the low enrolment for schools founded after 1995?" }, { "role": "assistant", "content": "SELECT MIN(\"enrolment\") FROM \"current_member_schools\" WHERE \"founded\">1995;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_member_schools\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"boys_girls\" text,\n \"day_boarding\" text,\n \"school_colors\" text\n);\n\nQuestion: WHere is the friends' school?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"current_member_schools\" WHERE \"school\"='the friends'' school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atari_5200\" (\n \"name\" text,\n \"current_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: What is the System with the Current version 3.0.0?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"atari_5200\" WHERE \"current_version\"='3.0.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atari_5200\" (\n \"name\" text,\n \"current_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: What is the Name when the License is gpl and the Current Version is 1.72?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"atari_5200\" WHERE \"license\"='gpl' AND \"current_version\"='1.72';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atari_5200\" (\n \"name\" text,\n \"current_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: What is the System when the Licence is gpl and the Current Version is 1.72?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"atari_5200\" WHERE \"license\"='gpl' AND \"current_version\"='1.72';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atari_5200\" (\n \"name\" text,\n \"current_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: What is the System with a freeware License?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"atari_5200\" WHERE \"license\"='freeware';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atari_5200\" (\n \"name\" text,\n \"current_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: What is the License when the Platform is windows and the Name is Altirra?" }, { "role": "assistant", "content": "SELECT \"license\" FROM \"atari_5200\" WHERE \"platform\"='windows' AND \"name\"='altirra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atari_5200\" (\n \"name\" text,\n \"current_version\" text,\n \"system\" text,\n \"platform\" text,\n \"license\" text\n);\n\nQuestion: What Platform has a Current Version 0.6.2?" }, { "role": "assistant", "content": "SELECT \"platform\" FROM \"atari_5200\" WHERE \"current_version\"='0.6.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance on October 9, 1983?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 9, 1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest attendance on September 4, 1983?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 4, 1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_high_schools\" (\n \"school_s_name\" text,\n \"school_s_namesake\" text,\n \"year_opened\" text,\n \"principal\" text,\n \"mascot\" text\n);\n\nQuestion: What is the name of the school whose namesake is John F. Kennedy?" }, { "role": "assistant", "content": "SELECT \"school_s_name\" FROM \"junior_high_schools\" WHERE \"school_s_namesake\"='john f. kennedy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_high_schools\" (\n \"school_s_name\" text,\n \"school_s_namesake\" text,\n \"year_opened\" text,\n \"principal\" text,\n \"mascot\" text\n);\n\nQuestion: What is the mascot whose school opened in 1970?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"junior_high_schools\" WHERE \"year_opened\"='1970';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_high_schools\" (\n \"school_s_name\" text,\n \"school_s_namesake\" text,\n \"year_opened\" text,\n \"principal\" text,\n \"mascot\" text\n);\n\nQuestion: What principal has a school mascot of the patriots?" }, { "role": "assistant", "content": "SELECT \"principal\" FROM \"junior_high_schools\" WHERE \"mascot\"='patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_high_schools\" (\n \"school_s_name\" text,\n \"school_s_namesake\" text,\n \"year_opened\" text,\n \"principal\" text,\n \"mascot\" text\n);\n\nQuestion: What is the namesake of the school whose mascot is the patriots?" }, { "role": "assistant", "content": "SELECT \"school_s_namesake\" FROM \"junior_high_schools\" WHERE \"mascot\"='patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_high_schools\" (\n \"school_s_name\" text,\n \"school_s_namesake\" text,\n \"year_opened\" text,\n \"principal\" text,\n \"mascot\" text\n);\n\nQuestion: What is the school namesake for Lincoln Junior High School?" }, { "role": "assistant", "content": "SELECT \"school_s_namesake\" FROM \"junior_high_schools\" WHERE \"school_s_name\"='lincoln junior high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1997_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What was the venue when the score was 24\u201328?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"1997_fixtures_and_results\" WHERE \"score\"='24\u201328';" } ]