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 \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is the Home Team on April 13 with a Road Team of St. Louis?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"road_team\"='st. louis' AND \"date\"='april 13';"
}
] |
[
{
"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\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Date is greater than 7, and when Game is \"82\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\">7 AND \"game\"=82;"
}
] |
[
{
"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\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Opponent, when Location/Attendance is \"Mellon Arena - 17,132\"?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location_attendance\"='mellon arena - 17,132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Game is greater than 78, and when Date is \"4\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\">78 AND \"date\"=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\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Opponent is \"Tampa Bay Lightning\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='tampa bay lightning';"
}
] |
[
{
"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\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Location/Attendance, when Score is \"4-5 (OT)\"?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"score\"='4-5 (ot)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"original_ner_class\" text,\n \"1914_ner_class\" text,\n \"lner_class\" text,\n \"cylinders\" text,\n \"driving_wheels\" text\n);\n\nQuestion: What driving wheels are on the m1 original NER class?"
},
{
"role": "assistant",
"content": "SELECT \"driving_wheels\" FROM \"classification\" WHERE \"original_ner_class\"='m1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"original_ner_class\" text,\n \"1914_ner_class\" text,\n \"lner_class\" text,\n \"cylinders\" text,\n \"driving_wheels\" text\n);\n\nQuestion: What is the LNER class with an m 1914 NER class?"
},
{
"role": "assistant",
"content": "SELECT \"lner_class\" FROM \"classification\" WHERE \"1914_ner_class\"='m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"original_ner_class\" text,\n \"1914_ner_class\" text,\n \"lner_class\" text,\n \"cylinders\" text,\n \"driving_wheels\" text\n);\n\nQuestion: What is the 1914 NER class with a d17/2 LNER class?"
},
{
"role": "assistant",
"content": "SELECT \"1914_ner_class\" FROM \"classification\" WHERE \"lner_class\"='d17/2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What was Lew Worsham's score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='lew worsham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Points have a Time/Retired of +49.222 secs?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"race\" WHERE \"time_retired\"='+49.222 secs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What are grid 4's average points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"race\" WHERE \"grid\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text\n);\n\nQuestion: Who was the owner of Give a Toast after 1985?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"winners\" WHERE \"year\">1985 AND \"winner\"='give a toast';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text\n);\n\nQuestion: What is the earliest year Stuart Janney III was an owner?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"winners\" WHERE \"owner\"='stuart janney iii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text\n);\n\nQuestion: Who was the winner after 1989 when Stronach Stable was the owner?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners\" WHERE \"year\">1989 AND \"owner\"='stronach stable';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text\n);\n\nQuestion: Who was the trainer when Mckaymackenna won?"
},
{
"role": "assistant",
"content": "SELECT \"trainer\" FROM \"winners\" WHERE \"winner\"='mckaymackenna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_ireland\" (\n \"county\" text,\n \"tunnel\" text,\n \"type\" text,\n \"length_imperial\" text,\n \"date_of_opening\" text\n);\n\nQuestion: What Tunnel has an Imperial Length of 307 yd?"
},
{
"role": "assistant",
"content": "SELECT \"tunnel\" FROM \"northern_ireland\" WHERE \"length_imperial\"='307 yd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_ireland\" (\n \"county\" text,\n \"tunnel\" text,\n \"type\" text,\n \"length_imperial\" text,\n \"date_of_opening\" text\n);\n\nQuestion: What Type of Tunnel is the Downhill Tunnel?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"northern_ireland\" WHERE \"tunnel\"='downhill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What did United States score in the place t6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"place\"='t6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which country has the player Ted Schulz?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"player\"='ted schulz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which country scored 69-67-69-70=275?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='69-67-69-70=275';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Date, when Game is 17?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What day was the away team Cardiff City?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='cardiff city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team had an away team of Aston Villa?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"away_team\"='aston villa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when York City was home?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"home_team\"='york city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_in_the_field\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: If the player is Corey Pavin when he had a To par of over 7, what was the sum of his totals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"past_champions_in_the_field\" WHERE \"to_par\">7 AND \"player\"='corey pavin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the round for the ufc on fox: velasquez vs. dos santos event?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc on fox: velasquez vs. dos santos';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Where was the game played when 71,060 people attended?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"attendance\"='71,060';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: When the game was played at Mile High Stadium before week 9, what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<9 AND \"game_site\"='mile high stadium';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Against the Houston Oilers after week 14, what was the result of the game?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">14 AND \"opponent\"='houston oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What player has +3 to par and score of 75-72=147?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"to_par\"='+3' AND \"score\"='75-72=147';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the country that the player is from with +3 to par and score of 74-73=147?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"to_par\"='+3' AND \"score\"='74-73=147';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What player has +2 to par?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"to_par\"='+2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" text\n);\n\nQuestion: Name the Team which has a Time/Retired of contact, and a Grid smaller than 17?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race\" WHERE \"time_retired\"='contact' AND \"grid\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Bronze, when Nation is \"North Korea\", and when Total is greater than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='north korea' 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 \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Bronze, when Total is greater than 10, when Silver is greater than 0, and when Rank is \"Total\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"total\">10 AND \"silver\">0 AND \"rank\"='total';"
}
] |
[
{
"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 Rank, when Silver is less than 6, when Bronze is greater than 4, and when Total is 10?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medal_table\" WHERE \"silver\"<6 AND \"bronze\">4 AND \"total\"=10;"
}
] |
[
{
"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 Gold, when Rank is 7?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"rank\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_year\" (\n \"year\" real,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"mixed_open\" text,\n \"men_s_u20\" text,\n \"women_s_u20\" text,\n \"senior_mixed\" text,\n \"men_s_30\" text,\n \"women_s_30\" text,\n \"men_s_35\" text,\n \"women_s_35\" text,\n \"men_s_40\" text,\n \"women_s_40\" text,\n \"men_s_45\" text,\n \"men_s_50\" text\n);\n\nQuestion: Which Men's 35 has a Women's Open of brisbane city cobras def hunter western hornets?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_35\" FROM \"results_by_year\" WHERE \"women_s_open\"='brisbane city cobras def hunter western hornets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_year\" (\n \"year\" real,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"mixed_open\" text,\n \"men_s_u20\" text,\n \"women_s_u20\" text,\n \"senior_mixed\" text,\n \"men_s_30\" text,\n \"women_s_30\" text,\n \"men_s_35\" text,\n \"women_s_35\" text,\n \"men_s_40\" text,\n \"women_s_40\" text,\n \"men_s_45\" text,\n \"men_s_50\" text\n);\n\nQuestion: Which Men's 50 has a Senior Mixed of n/A, and a Men's Open of gold coast sharks def sydney mets, and a Men's 30 of sydney mets def sydney scorpions, and a Women's u20 of southern suns def brisbane city cobras?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_50\" FROM \"results_by_year\" WHERE \"senior_mixed\"='n/a' AND \"men_s_open\"='gold coast sharks def sydney mets' AND \"men_s_30\"='sydney mets def sydney scorpions' AND \"women_s_u20\"='southern suns def brisbane city cobras';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_year\" (\n \"year\" real,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"mixed_open\" text,\n \"men_s_u20\" text,\n \"women_s_u20\" text,\n \"senior_mixed\" text,\n \"men_s_30\" text,\n \"women_s_30\" text,\n \"men_s_35\" text,\n \"women_s_35\" text,\n \"men_s_40\" text,\n \"women_s_40\" text,\n \"men_s_45\" text,\n \"men_s_50\" text\n);\n\nQuestion: Which Women's 35 has a Men's 50 of n/A, and a Men's 40 of southern suns def sunwest razorbacks?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_35\" FROM \"results_by_year\" WHERE \"men_s_50\"='n/a' AND \"men_s_40\"='southern suns def sunwest razorbacks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_year\" (\n \"year\" real,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"mixed_open\" text,\n \"men_s_u20\" text,\n \"women_s_u20\" text,\n \"senior_mixed\" text,\n \"men_s_30\" text,\n \"women_s_30\" text,\n \"men_s_35\" text,\n \"women_s_35\" text,\n \"men_s_40\" text,\n \"women_s_40\" text,\n \"men_s_45\" text,\n \"men_s_50\" text\n);\n\nQuestion: Which Men's u20 has a Men's 45 of n/A?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_u20\" FROM \"results_by_year\" WHERE \"men_s_45\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_year\" (\n \"year\" real,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"mixed_open\" text,\n \"men_s_u20\" text,\n \"women_s_u20\" text,\n \"senior_mixed\" text,\n \"men_s_30\" text,\n \"women_s_30\" text,\n \"men_s_35\" text,\n \"women_s_35\" text,\n \"men_s_40\" text,\n \"women_s_40\" text,\n \"men_s_45\" text,\n \"men_s_50\" text\n);\n\nQuestion: How many years have a Women's Open of brisbane city cobras def sydney mets, and a Men's 35 of n/A?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"results_by_year\" WHERE \"women_s_open\"='brisbane city cobras def sydney mets' AND \"men_s_35\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what is the surface on july 26, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_7\" WHERE \"date\"='july 26, 2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what is the tournament on august 17, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_7\" WHERE \"date\"='august 17, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: who is the opponent when the score is 7\u20135, 7\u20136 (8\u20136)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_7\" WHERE \"score\"='7\u20135, 7\u20136 (8\u20136)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what is the tournament on july 23, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_7\" WHERE \"date\"='july 23, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the opponent is fernando vicente?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_7\" WHERE \"opponent\"='fernando vicente';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: who is the opponent when the score is 3\u20136, 6\u20131, 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_7\" WHERE \"score\"='3\u20136, 6\u20131, 7\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_appearances\" (\n \"year\" real,\n \"song\" text,\n \"album_appearance\" text,\n \"album_artist\" text,\n \"notes\" text\n);\n\nQuestion: What is the lowest Year, when Notes is \"Spanish adaptation of \"Hope There's Someone.\"\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"other_appearances\" WHERE \"notes\"='spanish adaptation of \\\"hope there''s someone.\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_appearances\" (\n \"year\" real,\n \"song\" text,\n \"album_appearance\" text,\n \"album_artist\" text,\n \"notes\" text\n);\n\nQuestion: What is Album Artist, when Song is \"\"Something New\" (with Mint Royale and Class A)\"?"
},
{
"role": "assistant",
"content": "SELECT \"album_artist\" FROM \"other_appearances\" WHERE \"song\"='\\\"something new\\\" (with mint royale and class a)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Scott Hoch's to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"player\"='scott hoch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place is Nolan Henke in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='nolan henke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"legislative_elections\" (\n \"election\" real,\n \"total_votes\" real,\n \"share_of_votes\" text,\n \"outcome_of_election\" text,\n \"election_leader\" text\n);\n\nQuestion: What is the vote total for elections after 2001 with 44.5% participation?"
},
{
"role": "assistant",
"content": "SELECT \"total_votes\" FROM \"legislative_elections\" WHERE \"election\">2001 AND \"share_of_votes\"='44.5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the most league cup goals for David Beresford having less than 0 FA Cup Goals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_cup_goals\") FROM \"appearances_and_goals\" WHERE \"name\"='david beresford' AND \"fa_cup_goals\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the league goals when the league cup goals is less than 0 and 16 (1) league apps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"league_apps\"='16 (1)' AND \"league_cup_goals\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the league cup apps when the league goals are greater than 3, there are 30 (2) total apps, and has a position of mf?"
},
{
"role": "assistant",
"content": "SELECT \"league_cup_apps\" FROM \"appearances_and_goals\" WHERE \"position\"='mf' AND \"league_goals\">3 AND \"total_apps\"='30 (2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the FA Cup App for Squad Number 3 having fewer than 4 league goals?"
},
{
"role": "assistant",
"content": "SELECT \"fa_cup_apps\" FROM \"appearances_and_goals\" WHERE \"league_goals\"<4 AND \"squad_no\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest FA cup with 1 league cup, less than 12 total and 1 premier league?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"fa_cup\") FROM \"goal_scorers\" WHERE \"league_cup\"=1 AND \"total\"<12 AND \"premier_league\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the highest league cup with more than 0 FA cups, a premier league less than 34 and a total of 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_cup\") FROM \"goal_scorers\" WHERE \"fa_cup\">0 AND \"premier_league\"<34 AND \"total\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the average total of kenwyne jones, who has more than 10 premier leagues?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"goal_scorers\" WHERE \"name\"='kenwyne jones' AND \"premier_league\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"premier_league\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the highest league cup of danny collins, who has more than 1 premier league?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_cup\") FROM \"goal_scorers\" WHERE \"name\"='danny collins' AND \"premier_league\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the high assists in the game less than 19?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"game\"<19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the high rebounds in Philips Arena 12,088?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"location_attendance\"='philips arena 12,088';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the high points when the score was w 108\u2013105 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"score\"='w 108\u2013105 (ot)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the competition on 29 November 1997 that resulted in a draw?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international\" WHERE \"result\"='draw' AND \"date\"='29 november 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_government_in_the_faroe_islands\" (\n \"municipality\" text,\n \"population\" real,\n \"inhabitants_per_km\" real,\n \"area_in_km\" real,\n \"markatal\" real,\n \"island\" text,\n \"region\" text\n);\n\nQuestion: What is the average Area (in km\u00b2), when Markatal is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_in_km\") FROM \"local_government_in_the_faroe_islands\" WHERE \"markatal\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_government_in_the_faroe_islands\" (\n \"municipality\" text,\n \"population\" real,\n \"inhabitants_per_km\" real,\n \"area_in_km\" real,\n \"markatal\" real,\n \"island\" text,\n \"region\" text\n);\n\nQuestion: What is the highest Markatal, when Municipality is Leirv\u00edk, and when Inhabitants Per Km\u00b2 is greater than 79?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"markatal\") FROM \"local_government_in_the_faroe_islands\" WHERE \"municipality\"='leirv\u00edk' AND \"inhabitants_per_km\">79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_government_in_the_faroe_islands\" (\n \"municipality\" text,\n \"population\" real,\n \"inhabitants_per_km\" real,\n \"area_in_km\" real,\n \"markatal\" real,\n \"island\" text,\n \"region\" text\n);\n\nQuestion: What is the sum of Population, when Markatal is greater than 48, when Inhabitants Per Km\u00b2 is greater than 24, and when Municipality is Runav\u00edk?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"local_government_in_the_faroe_islands\" WHERE \"markatal\">48 AND \"inhabitants_per_km\">24 AND \"municipality\"='runav\u00edk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_government_in_the_faroe_islands\" (\n \"municipality\" text,\n \"population\" real,\n \"inhabitants_per_km\" real,\n \"area_in_km\" real,\n \"markatal\" real,\n \"island\" text,\n \"region\" text\n);\n\nQuestion: What is the sum of Markatal, when Inhabitants Per Km\u00b2 is less than 13, and when Area (in Km\u00b2) is 27?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"markatal\") FROM \"local_government_in_the_faroe_islands\" WHERE \"inhabitants_per_km\"<13 AND \"area_in_km\"=27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_campaigns\" (\n \"season\" real,\n \"competition\" text,\n \"games\" real,\n \"wins\" real,\n \"loses\" real,\n \"against\" text\n);\n\nQuestion: How many seasons have Losses larger than 1, and a Competition of fiba europe cup, and Wins smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"european_campaigns\" WHERE \"loses\">1 AND \"competition\"='fiba europe cup' AND \"wins\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_campaigns\" (\n \"season\" real,\n \"competition\" text,\n \"games\" real,\n \"wins\" real,\n \"loses\" real,\n \"against\" text\n);\n\nQuestion: How many Wins have Losses larger than 2, and an Against of 73.3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"european_campaigns\" WHERE \"loses\">2 AND \"against\"='73.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s_giants_12_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: In what Year was the Game on September 26?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"1960s_giants_12_6\" WHERE \"date\"='september 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s_giants_12_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What was the Loser of the Game with a Result of 35-27?"
},
{
"role": "assistant",
"content": "SELECT \"loser\" FROM \"1960s_giants_12_6\" WHERE \"result\"='35-27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s_giants_12_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: In what Year was the Result of the game 16-14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"1960s_giants_12_6\" WHERE \"result\"='16-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s_giants_12_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What Year had a Result of 34-25?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"1960s_giants_12_6\" WHERE \"result\"='34-25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s_giants_12_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What is the Winner of the Game on November 26?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"1960s_giants_12_6\" WHERE \"date\"='november 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2004_05\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What was the 2012/13 result for the tournament that had a 2006/07 and 2007/08 finish of LQ, with the tournament not held in 2009/10?"
},
{
"role": "assistant",
"content": "SELECT \"2012_13\" FROM \"performance_and_rankings_timeline\" WHERE \"2007_08\"='lq' AND \"2006_07\"='lq' AND \"2009_10\"='tournament not held';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2004_05\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What was the 2006/07 finish for the tournament that had a 2009/10 finish of LQ and a 2010/11 finish of A?"
},
{
"role": "assistant",
"content": "SELECT \"2006_07\" FROM \"performance_and_rankings_timeline\" WHERE \"2009_10\"='lq' AND \"2010_11\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_2_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What is the highest Position, when Pilot is \"Mario Kiessling\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"race_1_2_01_2010\" WHERE \"pilot\"='mario kiessling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_2_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What is the average Position, when Speed is \"143.5km/h\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"race_1_2_01_2010\" WHERE \"speed\"='143.5km/h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_2_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What is Glider, when Speed is \"147.3km/h\"?"
},
{
"role": "assistant",
"content": "SELECT \"glider\" FROM \"race_1_2_01_2010\" WHERE \"speed\"='147.3km/h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_2_01_2010\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What is Distance, when Pilot is \"Stanislaw Wujczak\"?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"race_1_2_01_2010\" WHERE \"pilot\"='stanislaw wujczak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text\n);\n\nQuestion: Who has a Jersey number of 31?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"m\" WHERE \"jersey_number_s\"='31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text\n);\n\nQuestion: What was the position in 1999?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"m\" WHERE \"years\"='1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the away team with a Tie no of 7?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is home team Chelsea's Tie no?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"home_team\"='chelsea';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What away team has a Tie no of 5?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: Can you tell me the Score that has the Player of raymond floyd?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='raymond floyd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: Can you tell me the Player that has the Country of united states, and the Score of 77-72-72=221?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"country\"='united states' AND \"score\"='77-72-72=221';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real\n);\n\nQuestion: Can you tell me the Score that has the Country of united states, and the To par of 8?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"country\"='united states' AND \"to_par\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: What was the time when his opponent was Cleber Luciano?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='cleber luciano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: What was the method in round 1 of the UFC 20 event?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"event\"='ufc 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Points, when Tries For is \"correct as of 00:00 11 June 2008\"?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"league_table\" WHERE \"tries_for\"='correct as of 00:00 11 june 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Try Bonus, when Lost is \"5\", and when Points is \"73\"?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"league_table\" WHERE \"lost\"='5' AND \"points\"='73';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Points, when Played is \"20\", and when Club is \"Caldicot RFC\"?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"league_table\" WHERE \"played\"='20' AND \"club\"='caldicot rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Points, when Drawn is \"1\", and when Lost is \"5\"?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"league_table\" WHERE \"drawn\"='1' AND \"lost\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Lost, when Points For is \"257\"?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"points_for\"='257';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Lost, when Losing Bonus is \"3\", and when Club is \"Bettws RFC\"?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"losing_bonus\"='3' AND \"club\"='bettws rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record when the visitor was Atlanta Hawks?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"december\" WHERE \"visitor\"='atlanta hawks';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.