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 \"busiest_domestic_routes_from_lex_april_2\" (\n \"rank\" real,\n \"city\" text,\n \"airport\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: What is the least passengers from the Dallas/Fort Worth International (DFW) airport?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"passengers\") FROM \"busiest_domestic_routes_from_lex_april_2\" WHERE \"airport\"='dallas/fort worth international (dfw)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_domestic_routes_from_lex_april_2\" (\n \"rank\" real,\n \"city\" text,\n \"airport\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: What city is ranked greater than 6, and the airport is St. Petersburg/Clearwater (PIE)"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"busiest_domestic_routes_from_lex_april_2\" WHERE \"rank\">6 AND \"airport\"='st. petersburg/clearwater (pie)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_domestic_routes_from_lex_april_2\" (\n \"rank\" real,\n \"city\" text,\n \"airport\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: What is the total rank of the airport that has 79,290 passengers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"busiest_domestic_routes_from_lex_april_2\" WHERE \"passengers\"='79,290';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_nordic_combined\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" text,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Which Winner has a Country of norway, and a FIS Nordic World Ski Championships of 1924?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"men_s_nordic_combined\" WHERE \"country\"='norway' AND \"fis_nordic_world_ski_championships\"='1924';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_nordic_combined\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" text,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Which Country has a FIS Nordic World Ski Championships of 1948, 1950?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"men_s_nordic_combined\" WHERE \"fis_nordic_world_ski_championships\"='1948, 1950';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_nordic_combined\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" text,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Which Holmenkollen has a Country of norway, and a Winner of tom sandberg?"
},
{
"role": "assistant",
"content": "SELECT \"holmenkollen\" FROM \"men_s_nordic_combined\" WHERE \"country\"='norway' AND \"winner\"='tom sandberg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_nordic_combined\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" text,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Which FIS Nordic World Ski Championships has Winter Olympics of 1960?"
},
{
"role": "assistant",
"content": "SELECT \"fis_nordic_world_ski_championships\" FROM \"men_s_nordic_combined\" WHERE \"winter_olympics\"='1960';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_nordic_combined\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" text,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Which Country has a Winter Olympics of 1948?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"men_s_nordic_combined\" WHERE \"winter_olympics\"='1948';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_nordic_combined\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" text,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: Which Winner has a Winter Olympics of 1968?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"men_s_nordic_combined\" WHERE \"winter_olympics\"='1968';"
}
] |
[
{
"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: What was the result of the game when the attendance was 43,279?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='43,279';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_cup_winners_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average Attendance, when Date is 1 October 1998?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"uefa_cup_winners_cup\" WHERE \"date\"='1 october 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_cup_winners_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is Opponent, when Date is 17 September 1998?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"uefa_cup_winners_cup\" WHERE \"date\"='17 september 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_cup_winners_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is Opponent, when Date is 8 April 1999?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"uefa_cup_winners_cup\" WHERE \"date\"='8 april 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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 HIGHEST POINTS FOR LOS ANGELES?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"regular_season\" WHERE \"opponent\"='los angeles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendly_match_details\" (\n \"date\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text\n);\n\nQuestion: What was the Score F-A when the result was D?"
},
{
"role": "assistant",
"content": "SELECT \"score_f_a\" FROM \"pre_season_friendly_match_details\" WHERE \"result\"='d';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendly_match_details\" (\n \"date\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text\n);\n\nQuestion: On which date did they play Leicester City in Venue A?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pre_season_friendly_match_details\" WHERE \"venue\"='a' AND \"opponents\"='leicester city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendly_match_details\" (\n \"date\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text\n);\n\nQuestion: What was the result of the game played in Venue H?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"pre_season_friendly_match_details\" WHERE \"venue\"='h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendly_match_details\" (\n \"date\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text\n);\n\nQuestion: What was the result of the game played on 17 July 2008?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"pre_season_friendly_match_details\" WHERE \"date\"='17 july 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"passenger\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What Passenger has 16 Wins?"
},
{
"role": "assistant",
"content": "SELECT \"passenger\" FROM \"season_by_season\" WHERE \"wins\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcasting\" (\n \"small_season_number\" real,\n \"time_of_broadcast\" text,\n \"days_of_the_week\" text,\n \"hours\" text,\n \"length_of_episode\" text,\n \"picture_format\" text\n);\n\nQuestion: Name the Time of broadcast has a Picture format of 4:3, and Hours of 20:30, and Days of the week of monday, wednesday, friday?"
},
{
"role": "assistant",
"content": "SELECT \"time_of_broadcast\" FROM \"broadcasting\" WHERE \"picture_format\"='4:3' AND \"hours\"='20:30' AND \"days_of_the_week\"='monday, wednesday, friday';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcasting\" (\n \"small_season_number\" real,\n \"time_of_broadcast\" text,\n \"days_of_the_week\" text,\n \"hours\" text,\n \"length_of_episode\" text,\n \"picture_format\" text\n);\n\nQuestion: Which Days of the week has a Time of broadcast in january\u2013february, june 2002?"
},
{
"role": "assistant",
"content": "SELECT \"days_of_the_week\" FROM \"broadcasting\" WHERE \"time_of_broadcast\"='january\u2013february, june 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Outcome has a Championship of us championships, and a Score in the final of 5\u20137, 6\u20131, 6\u20133, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"grand_slam\" WHERE \"championship\"='us championships' AND \"score_in_the_final\"='5\u20137, 6\u20131, 6\u20133, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Outcome has a Year larger than 1939, and an Opponent in the final of frank kovacs?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"grand_slam\" WHERE \"year\">1939 AND \"opponent_in_the_final\"='frank kovacs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Surface has an Opponent in the final of don mcneill, and a Year of 1940?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"grand_slam\" WHERE \"opponent_in_the_final\"='don mcneill' AND \"year\"=1940;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many years have an Opponent in the final of welby van horn?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"grand_slam\" WHERE \"opponent_in_the_final\"='welby van horn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What is the score of player dick metz?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='dick metz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bezirksliga\" (\n \"season\" text,\n \"north\" text,\n \"south\" text,\n \"east\" text,\n \"west\" text\n);\n\nQuestion: Which season had EV Bad W\u00f6rishofen in the West?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"bezirksliga\" WHERE \"west\"='ev bad w\u00f6rishofen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bezirksliga\" (\n \"season\" text,\n \"north\" text,\n \"south\" text,\n \"east\" text,\n \"west\" text\n);\n\nQuestion: Who was in the South in the 2004-05 season?"
},
{
"role": "assistant",
"content": "SELECT \"south\" FROM \"bezirksliga\" WHERE \"season\"='2004-05';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bezirksliga\" (\n \"season\" text,\n \"north\" text,\n \"south\" text,\n \"east\" text,\n \"west\" text\n);\n\nQuestion: Who was in the South when EV Bad W\u00f6rishofen was in the West?"
},
{
"role": "assistant",
"content": "SELECT \"south\" FROM \"bezirksliga\" WHERE \"west\"='ev bad w\u00f6rishofen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bezirksliga\" (\n \"season\" text,\n \"north\" text,\n \"south\" text,\n \"east\" text,\n \"west\" text\n);\n\nQuestion: Who was in the South when TSV Kottern was in the West and EHF Passau was in the East?"
},
{
"role": "assistant",
"content": "SELECT \"south\" FROM \"bezirksliga\" WHERE \"west\"='tsv kottern' AND \"east\"='ehf passau';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bezirksliga\" (\n \"season\" text,\n \"north\" text,\n \"south\" text,\n \"east\" text,\n \"west\" text\n);\n\nQuestion: Who was in the East when TUS Geretsried II was in the South?"
},
{
"role": "assistant",
"content": "SELECT \"east\" FROM \"bezirksliga\" WHERE \"south\"='tus geretsried ii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bezirksliga\" (\n \"season\" text,\n \"north\" text,\n \"south\" text,\n \"east\" text,\n \"west\" text\n);\n\nQuestion: Who was in the West when ESV Gebensbach was in the East?"
},
{
"role": "assistant",
"content": "SELECT \"west\" FROM \"bezirksliga\" WHERE \"east\"='esv gebensbach';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Gold, when Nation is Hungary, and when Bronze is greater than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='hungary' 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 \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Total, when Nation is Soviet Union, and when Gold is greater than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"nation\"='soviet union' AND \"gold\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of Bronze, when Silver is greater than 0, when Gold is greater than 3, and when Rank is 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"silver\">0 AND \"gold\">3 AND \"rank\"='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 \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest Bronze, when Total is less than 3, and when Silver is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"total\"<3 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 \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Total, when Silver is greater than 4, and when Gold is greater than 16?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"silver\">4 AND \"gold\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Silver, when Total is less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"total\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_semester\" (\n \"day_1\" text,\n \"day_2\" text,\n \"day_3\" text,\n \"day_4\" text,\n \"day_5\" text,\n \"wednesday\" text\n);\n\nQuestion: What is day 4 when day 2 is PAAQ?"
},
{
"role": "assistant",
"content": "SELECT \"day_4\" FROM \"first_semester\" WHERE \"day_2\"='paaq';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religion\" (\n \"ethnicity\" text,\n \"islam\" text,\n \"christianity\" text,\n \"judaism\" text,\n \"buddhism\" text,\n \"other\" text,\n \"atheism\" text\n);\n\nQuestion: What is the other value associated with a Christianity value of 10.24%?"
},
{
"role": "assistant",
"content": "SELECT \"other\" FROM \"religion\" WHERE \"christianity\"='10.24%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religion\" (\n \"ethnicity\" text,\n \"islam\" text,\n \"christianity\" text,\n \"judaism\" text,\n \"buddhism\" text,\n \"other\" text,\n \"atheism\" text\n);\n\nQuestion: What is the Judaism percentage associated with Buddhism at 0.01% and Other at 0.13%?"
},
{
"role": "assistant",
"content": "SELECT \"judaism\" FROM \"religion\" WHERE \"other\"='0.13%' AND \"buddhism\"='0.01%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religion\" (\n \"ethnicity\" text,\n \"islam\" text,\n \"christianity\" text,\n \"judaism\" text,\n \"buddhism\" text,\n \"other\" text,\n \"atheism\" text\n);\n\nQuestion: What is the percentage of Atheism associated with an other percentage of 0.08%?"
},
{
"role": "assistant",
"content": "SELECT \"atheism\" FROM \"religion\" WHERE \"other\"='0.08%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religion\" (\n \"ethnicity\" text,\n \"islam\" text,\n \"christianity\" text,\n \"judaism\" text,\n \"buddhism\" text,\n \"other\" text,\n \"atheism\" text\n);\n\nQuestion: What is the percentage of Buddhists associated with a Christianity percentage of 52.32%?"
},
{
"role": "assistant",
"content": "SELECT \"buddhism\" FROM \"religion\" WHERE \"christianity\"='52.32%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religion\" (\n \"ethnicity\" text,\n \"islam\" text,\n \"christianity\" text,\n \"judaism\" text,\n \"buddhism\" text,\n \"other\" text,\n \"atheism\" text\n);\n\nQuestion: What is the percentage of Judaism associated with Christianity at 2.51%?"
},
{
"role": "assistant",
"content": "SELECT \"judaism\" FROM \"religion\" WHERE \"christianity\"='2.51%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religion\" (\n \"ethnicity\" text,\n \"islam\" text,\n \"christianity\" text,\n \"judaism\" text,\n \"buddhism\" text,\n \"other\" text,\n \"atheism\" text\n);\n\nQuestion: What is the value of other religions associated with atheism at 1.86%?"
},
{
"role": "assistant",
"content": "SELECT \"other\" FROM \"religion\" WHERE \"atheism\"='1.86%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What is No. 2, when No. 9 is Mia?"
},
{
"role": "assistant",
"content": "SELECT \"no_2\" FROM \"female_names\" WHERE \"no_9\"='mia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What is No. 7, when No. 4 is Madison, and when No. 10 is Amelia?"
},
{
"role": "assistant",
"content": "SELECT \"no_7\" FROM \"female_names\" WHERE \"no_4\"='madison' AND \"no_10\"='amelia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What is No.1, when No. 2 is Emma, and when No. 7 is Olivia?"
},
{
"role": "assistant",
"content": "SELECT \"no_1\" FROM \"female_names\" WHERE \"no_2\"='emma' AND \"no_7\"='olivia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What is No. 5, when No. 2 is Olivia, when No. 4 is Ava, and when No. 6 is Abigail?"
},
{
"role": "assistant",
"content": "SELECT \"no_5\" FROM \"female_names\" WHERE \"no_2\"='olivia' AND \"no_4\"='ava' AND \"no_6\"='abigail';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What is No. 3, when No. 7 is Abigail, and when No. 2 is Olivia?"
},
{
"role": "assistant",
"content": "SELECT \"no_3\" FROM \"female_names\" WHERE \"no_7\"='abigail' AND \"no_2\"='olivia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What is No. 3, when No. 7 is Abigail, and when No. 4 is Ava?"
},
{
"role": "assistant",
"content": "SELECT \"no_3\" FROM \"female_names\" WHERE \"no_7\"='abigail' AND \"no_4\"='ava';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many Laps have Grid larger than 14, and a Rider of sylvain guintoli?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\">14 AND \"rider\"='sylvain guintoli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid has Laps of 24, and a Rider of marco melandri?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"moto_gp_classification\" WHERE \"laps\"=24 AND \"rider\"='marco melandri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid has Laps smaller than 24, and a Time of retirement?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"moto_gp_classification\" WHERE \"laps\"<24 AND \"time\"='retirement';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid has a Rider of randy de puniet, and Laps smaller than 24?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"moto_gp_classification\" WHERE \"rider\"='randy de puniet' AND \"laps\"<24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: What was the type of surface played on for the week of March 17?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles\" WHERE \"week\"='march 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: What was the tournament for the week of August 4?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles\" WHERE \"week\"='august 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which tournament had Richard Krajicek as a finalist?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles\" WHERE \"finalist\"='richard krajicek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: On what date did Detroit play at home?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"home\"='detroit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Who was the home team on June 9?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"playoffs\" WHERE \"date\"='june 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the money value that went along with the score of 68-67-69-76=280?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"score\"='68-67-69-76=280';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What score did Leonard Thompson have when he won $9,000?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"money\"='9,000' AND \"player\"='leonard thompson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What date had a record of 15-14-4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='15-14-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the fame number when the Montreal Canadiens were the opponent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"opponent\"='montreal canadiens';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of game 35?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average oveall pick for players from the college of Miami (FL)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='miami (fl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player was drafted overall from the college of Nebraska in a round under 6, pick of 15, and overall under 224?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"<224 AND \"round\"<6 AND \"pick\"=15 AND \"college\"='nebraska';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest overall draft pick number for terry daniels who was picked in round 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\"=10 AND \"name\"='terry daniels';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of the rounds where the draft pick came from the college of tennessee and had an overall pick number bigger than 153 and a pick less than 14?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='tennessee' AND \"overall\">153 AND \"pick\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position did the draft pick number play that was overall pick number 133?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"=133;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall pick number for the player who was picked on round 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did the player who had the position of OT come from who was pick number less than 12 and a overall pick number bigger than 226?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"overall\">226 AND \"pick\"<12 AND \"position\"='ot';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: WHAT IS THE APPOINTMENT DATE WITH A PRE-SEASON POSITION, AND REPLACED BY THOMAS THOMASBERG?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"position_in_table\"='pre-season' AND \"replaced_by\"='thomas thomasberg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: WHAT IS THE APPOINTMENT DATE FOR AC HORSENS?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"team\"='ac horsens';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: WHAT TEAM HAS 12TH TABLE POSITION AND REPLACED BY OVE PEDERSEN?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"position_in_table\"='12th' AND \"replaced_by\"='ove pedersen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when Calgary was visiting team and Niittymaki had the decision?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"decision\"='niittymaki' AND \"visitor\"='calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score when Biron got the decision and Philadelphia was the visitor on March 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"decision\"='biron' AND \"visitor\"='philadelphia' AND \"date\"='march 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance when Pittsburgh is the home team?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"regular_season\" WHERE \"home\"='pittsburgh';"
}
] |
[
{
"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 was the Attendance after Week 4 on October 10, 1971?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 10, 1971' AND \"week\">4;"
}
] |
[
{
"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 was the Attendance in the game against the New Orleans Saints?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='new orleans saints';"
}
] |
[
{
"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 Date in Week 7 with an Attendance greater than 44,000?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\">'44,000' AND \"week\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text,\n \"rank\" text,\n \"bird_uniform\" text,\n \"weapon\" text,\n \"mecha\" text,\n \"japanese_voice_actor\" text,\n \"voice_actor_botp\" text,\n \"voice_actor_g_force\" text,\n \"voice_actor_harmony_gold_ova_dub\" text,\n \"voice_actor_eagle_riders\" text,\n \"voice_actor_adv_tv_sentai_ova_dub\" text\n);\n\nQuestion: What is the Eagle Riders character voiced by Japanese voice actor Katsuji Mori?"
},
{
"role": "assistant",
"content": "SELECT \"eagle_riders\" FROM \"characters\" WHERE \"japanese_voice_actor\"='katsuji mori';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text,\n \"rank\" text,\n \"bird_uniform\" text,\n \"weapon\" text,\n \"mecha\" text,\n \"japanese_voice_actor\" text,\n \"voice_actor_botp\" text,\n \"voice_actor_g_force\" text,\n \"voice_actor_harmony_gold_ova_dub\" text,\n \"voice_actor_eagle_riders\" text,\n \"voice_actor_adv_tv_sentai_ova_dub\" text\n);\n\nQuestion: Which Voice Actor for Eagle Riders had a bird uniform of condor?"
},
{
"role": "assistant",
"content": "SELECT \"voice_actor_eagle_riders\" FROM \"characters\" WHERE \"bird_uniform\"='condor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text,\n \"rank\" text,\n \"bird_uniform\" text,\n \"weapon\" text,\n \"mecha\" text,\n \"japanese_voice_actor\" text,\n \"voice_actor_botp\" text,\n \"voice_actor_g_force\" text,\n \"voice_actor_harmony_gold_ova_dub\" text,\n \"voice_actor_eagle_riders\" text,\n \"voice_actor_adv_tv_sentai_ova_dub\" text\n);\n\nQuestion: Which weapon was used when the Battle of the Planets was Jason?"
},
{
"role": "assistant",
"content": "SELECT \"weapon\" FROM \"characters\" WHERE \"battle_of_the_planets\"='jason';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text,\n \"rank\" text,\n \"bird_uniform\" text,\n \"weapon\" text,\n \"mecha\" text,\n \"japanese_voice_actor\" text,\n \"voice_actor_botp\" text,\n \"voice_actor_g_force\" text,\n \"voice_actor_harmony_gold_ova_dub\" text,\n \"voice_actor_eagle_riders\" text,\n \"voice_actor_adv_tv_sentai_ova_dub\" text\n);\n\nQuestion: Who was the voice actor (ADV TV/Sentai OVA dub) for the Gatchaman, jun?"
},
{
"role": "assistant",
"content": "SELECT \"voice_actor_adv_tv_sentai_ova_dub\" FROM \"characters\" WHERE \"gatchaman\"='jun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text,\n \"rank\" text,\n \"bird_uniform\" text,\n \"weapon\" text,\n \"mecha\" text,\n \"japanese_voice_actor\" text,\n \"voice_actor_botp\" text,\n \"voice_actor_g_force\" text,\n \"voice_actor_harmony_gold_ova_dub\" text,\n \"voice_actor_eagle_riders\" text,\n \"voice_actor_adv_tv_sentai_ova_dub\" text\n);\n\nQuestion: Which Japanese voice actor had the Mecha of airplane?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_voice_actor\" FROM \"characters\" WHERE \"mecha\"='airplane';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which 1st leg has a Team 1 of drita?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"eighth_finals\" WHERE \"team_1\"='drita';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 2 has a Team 1 of vardar?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"eighth_finals\" WHERE \"team_1\"='vardar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 1 has a 2nd leg of 1\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"eighth_finals\" WHERE \"2nd_leg\"='1\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"f\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What years was the jersey number(s) smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"f\" WHERE \"jersey_number_s\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"f\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Which position was played by the player wearing jersey number 40?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"f\" WHERE \"jersey_number_s\"=40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"f\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What was the jersey number(s) when the position was SG from North Carolina?"
},
{
"role": "assistant",
"content": "SELECT \"jersey_number_s\" FROM \"f\" WHERE \"position\"='sg' AND \"from\"='north carolina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"f\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Which nationality does Cincinnati belong to?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"f\" WHERE \"from\"='cincinnati';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"f\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Where is jersey number 3 from?"
},
{
"role": "assistant",
"content": "SELECT \"from\" FROM \"f\" WHERE \"jersey_number_s\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What pick number was the rhp with a hometown/school of university of hawaii?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"first_round_selections\" WHERE \"position\"='rhp' AND \"hometown_school\"='university of hawaii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What player was drafted number 10?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round_selections\" WHERE \"pick\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What number pick was the player with the hometown school of concordia college?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"first_round_selections\" WHERE \"hometown_school\"='concordia college';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the date of game 66?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"game\"=66;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the game on February 21?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"season_schedule\" WHERE \"date\"='february 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the average number of draws that has a played entry of less than 30 and a goal difference greater than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draws\") FROM \"group_i\" WHERE \"goal_difference\">2 AND \"played\"<30;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.