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 \"variation_with_playing_cards\" (\n \"1st_player_s_choice\" text,\n \"2nd_player_s_choice\" text,\n \"probability_1st_player_wins\" text,\n \"probability_2nd_player_wins\" text,\n \"probability_of_a_draw\" text\n);\n\nQuestion: when the 1st player has a choice of bb r what is the 2nd player's probability of winning?"
},
{
"role": "assistant",
"content": "SELECT \"probability_2nd_player_wins\" FROM \"variation_with_playing_cards\" WHERE \"1st_player_s_choice\"='bb r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variation_with_playing_cards\" (\n \"1st_player_s_choice\" text,\n \"2nd_player_s_choice\" text,\n \"probability_1st_player_wins\" text,\n \"probability_2nd_player_wins\" text,\n \"probability_of_a_draw\" text\n);\n\nQuestion: When the 2nd player's choice is r bb what is the probability the 1st player wins 0.11%?"
},
{
"role": "assistant",
"content": "SELECT \"probability_of_a_draw\" FROM \"variation_with_playing_cards\" WHERE \"2nd_player_s_choice\"='r bb' AND \"probability_1st_player_wins\"='0.11%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variation_with_playing_cards\" (\n \"1st_player_s_choice\" text,\n \"2nd_player_s_choice\" text,\n \"probability_1st_player_wins\" text,\n \"probability_2nd_player_wins\" text,\n \"probability_of_a_draw\" text\n);\n\nQuestion: When the 2nd player chooses r bb, what is the 2nd player's probability of a winning draw of 93.54%?"
},
{
"role": "assistant",
"content": "SELECT \"probability_of_a_draw\" FROM \"variation_with_playing_cards\" WHERE \"probability_2nd_player_wins\"='93.54%' AND \"2nd_player_s_choice\"='r bb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Collingwood's score as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team when the away team scored 4.9 (33)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"away_team_score\"='4.9 (33)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the average crowd size when teh home team scored 13.24 (102)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_3\" WHERE \"home_team_score\"='13.24 (102)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features carlton as the home side?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_11\" WHERE \"home_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is collingwood the home side?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_11\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team's score when hawthorn is away?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home side when the away side score is 8.8 (56)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"away_team_score\"='8.8 (56)';"
}
] |
[
{
"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: The event that has a record of 1-0 is none of the above."
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft_picks\" (\n \"name\" text,\n \"round\" text,\n \"overall_pick\" text,\n \"year\" real,\n \"team\" text\n);\n\nQuestion: What year was Leon Blevins picked?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"nba_draft_picks\" WHERE \"name\"='leon blevins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft_picks\" (\n \"name\" text,\n \"round\" text,\n \"overall_pick\" text,\n \"year\" real,\n \"team\" text\n);\n\nQuestion: What year was Jordan Hill picked overall number 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"nba_draft_picks\" WHERE \"overall_pick\"='8' AND \"name\"='jordan hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft_picks\" (\n \"name\" text,\n \"round\" text,\n \"overall_pick\" text,\n \"year\" real,\n \"team\" text\n);\n\nQuestion: In 1981 which team picked overall 148?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"nba_draft_picks\" WHERE \"year\"=1981 AND \"overall_pick\"='148';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_chart\" (\n \"couple\" text,\n \"place\" real,\n \"wk_1\" real,\n \"wk_2\" real,\n \"tot_1_2\" real\n);\n\nQuestion: What is the place of the team that had a total score larger than 37 and a week one score above 20?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"place\") FROM \"scoring_chart\" WHERE \"tot_1_2\">37 AND \"wk_1\">20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the game on December 2, 1951?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season_schedule\" WHERE \"date\"='december 2, 1951';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: After week 9, which games had an attendance greater than 24,229?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season_schedule\" WHERE \"attendance\">'24,229' AND \"week\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue does st kilda play at as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is melbourne's home team score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many games is collingwood the home side?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_18\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"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: Who was the opponent on the date of November 29, 1970 and the attendance was less than 31,427?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"date\"='november 29, 1970' AND \"attendance\"<'31,427';"
}
] |
[
{
"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: On what date was the game where is was later than Week 4 of the season and the opponent was the New York Giants?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">4 AND \"opponent\"='new york giants';"
}
] |
[
{
"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 of the game on December 13, 1970?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"date\"='december 13, 1970' AND \"week\">13;"
}
] |
[
{
"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 \"attendance\" real\n);\n\nQuestion: What is the date before week 13 and Miami Dolphins as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<13 AND \"opponent\"='miami dolphins';"
}
] |
[
{
"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 \"attendance\" real\n);\n\nQuestion: What is the attendance for week 11?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size when the home side scores 8.9 (57)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_17\" WHERE \"home_team_score\"='8.9 (57)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team's score for north melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size when the home team scores 16.9 (105)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_17\" WHERE \"home_team_score\"='16.9 (105)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver_s\" text,\n \"sponsor_s\" text,\n \"rounds\" text\n);\n\nQuestion: Who sponsors Josele Garza in all rounds?"
},
{
"role": "assistant",
"content": "SELECT \"sponsor_s\" FROM \"teams_and_drivers\" WHERE \"rounds\"='all' AND \"driver_s\"='josele garza';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver_s\" text,\n \"sponsor_s\" text,\n \"rounds\" text\n);\n\nQuestion: Which rounds did the team Walther participate in?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"team\"='walther';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver_s\" text,\n \"sponsor_s\" text,\n \"rounds\" text\n);\n\nQuestion: What team was Tom Sneva on in rounds 1-9?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams_and_drivers\" WHERE \"driver_s\"='tom sneva' AND \"rounds\"='1-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver_s\" text,\n \"sponsor_s\" text,\n \"rounds\" text\n);\n\nQuestion: Which rounds do Arciero Wines sponsor a March 85c chassis?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"sponsor_s\"='arciero wines' AND \"chassis\"='march 85c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_chapters\" (\n \"chapter\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What years were the inactive North Carolina chapter active?"
},
{
"role": "assistant",
"content": "SELECT \"charter_range\" FROM \"list_of_chapters\" WHERE \"status\"='inactive' AND \"state\"='north carolina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_chapters\" (\n \"chapter\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What years were the inactive Idaho chapter active?"
},
{
"role": "assistant",
"content": "SELECT \"charter_range\" FROM \"list_of_chapters\" WHERE \"status\"='inactive' AND \"state\"='idaho';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_chapters\" (\n \"chapter\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: Which chapter was active from 1906-1991?"
},
{
"role": "assistant",
"content": "SELECT \"chapter\" FROM \"list_of_chapters\" WHERE \"charter_range\"='1906-1991';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_chapters\" (\n \"chapter\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What are the active dates for the Montana State University chapter?"
},
{
"role": "assistant",
"content": "SELECT \"charter_range\" FROM \"list_of_chapters\" WHERE \"school\"='montana state university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_chapters\" (\n \"chapter\" text,\n \"chartered\" text,\n \"school\" text,\n \"state\" text,\n \"status\" text,\n \"charter_range\" text\n);\n\nQuestion: What state had an active chapter from 1906-1991?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"list_of_chapters\" WHERE \"charter_range\"='1906-1991';"
}
] |
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: How many people were at the game with a record of 6-1?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"record\"='6-1';"
}
] |
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: When was there a game against the Indianapolis colts?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='indianapolis colts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the lowest crowd size at MCG?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_16\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team name that has a score of 7.10 (52)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"away_team_score\"='7.10 (52)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size when the home team is North Melbourne?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_16\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team score when the home team is North Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What is the pole position for marlboro challenge?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"races\" WHERE \"race_name\"='marlboro challenge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What circut has an unknown fastest lap on July 19?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"races\" WHERE \"fastest_lap\"='unknown' AND \"date\"='july 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What circuit did marlboro team penske win with an unknown fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"races\" WHERE \"winning_team\"='marlboro team penske' AND \"fastest_lap\"='unknown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What team does mario andretti play pole position for?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"races\" WHERE \"pole_position\"='mario andretti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue where Carlton was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_4\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue where the home team scored 13.9 (87)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_4\" WHERE \"home_team_score\"='13.9 (87)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team whose opponents scored 8.16 (64)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team_score\"='8.16 (64)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue when Carlton was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_4\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What was the highest heat with a time slower than 48.87 from sweden?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"heat\") FROM \"semifinals\" WHERE \"time\">48.87 AND \"nationality\"='sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: How many lanes featured a swimmer ranked above 4, in a heat later than 1, from australia, named ashley callus?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"semifinals\" WHERE \"rank\">4 AND \"heat\">1 AND \"nationality\"='australia' AND \"name\"='ashley callus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_by_gdp\" (\n \"rank\" real,\n \"city\" text,\n \"state\" text,\n \"gdp_in_id_b\" text,\n \"population_m_luz\" real,\n \"gdp_per_capita_id_k\" text,\n \"eurozone\" text\n);\n\nQuestion: What is the Eurozone result for Population M (LUZ) of 3.08?"
},
{
"role": "assistant",
"content": "SELECT \"eurozone\" FROM \"cities_by_gdp\" WHERE \"population_m_luz\"=3.08;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_by_gdp\" (\n \"rank\" real,\n \"city\" text,\n \"state\" text,\n \"gdp_in_id_b\" text,\n \"population_m_luz\" real,\n \"gdp_per_capita_id_k\" text,\n \"eurozone\" text\n);\n\nQuestion: What is the GDP $IDB in Istanbul?"
},
{
"role": "assistant",
"content": "SELECT \"gdp_in_id_b\" FROM \"cities_by_gdp\" WHERE \"city\"='istanbul';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"men_s_nickname\" text,\n \"women_s_nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" text\n);\n\nQuestion: What is the most recently founded school that joined in 2011?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"founded\") FROM \"current_members\" WHERE \"joined\"='2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team that scored 24.14 (158) in front of a crowd larger than 18,000?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_12\" WHERE \"crowd\">'18,000' AND \"home_team_score\"='24.14 (158)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team that played Geelong?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team's score when they played Richmond?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is Melbourne's home venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue when the away team scored 9.17 (71)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"away_team_score\"='9.17 (71)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the overall draft pick for the player selected for the tight end position?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"2003_new_england_patriots_draft_selectio\" WHERE \"position\"='tight end';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team corresponds to an away team score of 10.12 (72)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"away_team_score\"='10.12 (72)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date is Hawthorn the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_5\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date is St Kilda the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_5\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who did the Browns play on October 13, 1968?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season_schedule\" WHERE \"date\"='october 13, 1968';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which game is named tsegay kebede category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"list_of_medalists\" WHERE \"name\"='tsegay kebede category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which event in the 2000 Sydney games was in the category gete wami category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"games\"='2000 sydney' AND \"name\"='gete wami category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which event in the 2008 Beijing Games had a bronze medal?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"games\"='2008 beijing' AND \"medal\"='bronze';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What is the medal named fatuma roba category:articles with hcards for?"
},
{
"role": "assistant",
"content": "SELECT \"medal\" FROM \"list_of_medalists\" WHERE \"name\"='fatuma roba category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What is the game named derartu tulu category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"list_of_medalists\" WHERE \"name\"='derartu tulu category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"finish\" text,\n \"race\" text,\n \"distance\" text,\n \"jockey\" text,\n \"time\" text,\n \"grade\" text,\n \"runner_up_winner\" text,\n \"track\" text\n);\n\nQuestion: What is the fastest time for the Kentucky Derby race?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"races\" WHERE \"race\"='kentucky derby';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"finish\" text,\n \"race\" text,\n \"distance\" text,\n \"jockey\" text,\n \"time\" text,\n \"grade\" text,\n \"runner_up_winner\" text,\n \"track\" text\n);\n\nQuestion: Which track does the Woodward Stakes race take place on?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"races\" WHERE \"race\"='woodward stakes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"finish\" text,\n \"race\" text,\n \"distance\" text,\n \"jockey\" text,\n \"time\" text,\n \"grade\" text,\n \"runner_up_winner\" text,\n \"track\" text\n);\n\nQuestion: What grade did jockey Robby Albarado get when racing with Ravens Pass?"
},
{
"role": "assistant",
"content": "SELECT \"grade\" FROM \"races\" WHERE \"jockey\"='robby albarado' AND \"runner_up_winner\"='ravens pass';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_lanterne_rouge\" (\n \"year\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"age_category\" text\n);\n\nQuestion: In which Age Category is Marco Manenti?"
},
{
"role": "assistant",
"content": "SELECT \"age_category\" FROM \"men_s_lanterne_rouge\" WHERE \"name\"='marco manenti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_lanterne_rouge\" (\n \"year\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"age_category\" text\n);\n\nQuestion: Which year has a Time of 13:23:43?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"men_s_lanterne_rouge\" WHERE \"time\"='13:23:43';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What score has 3-7 as the record?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='3-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What loss has 16,458 as an Att.?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"att\"='16,458';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What date has 5-3 as the score, and holt (1-1) as a loss?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='5-3' AND \"loss\"='holt (1-1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transport\" (\n \"s_no\" real,\n \"company\" text,\n \"incorporated\" real,\n \"ministry\" text,\n \"sector\" text\n);\n\nQuestion: What is the sector of the company with an incorporated date before 1983?"
},
{
"role": "assistant",
"content": "SELECT \"sector\" FROM \"transport\" WHERE \"incorporated\"<1983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transport\" (\n \"s_no\" real,\n \"company\" text,\n \"incorporated\" real,\n \"ministry\" text,\n \"sector\" text\n);\n\nQuestion: What is the average incorporataed year of the Air India Charters company?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"incorporated\") FROM \"transport\" WHERE \"company\"='air india charters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lanka_sama_samaja_party_electoral_result\" (\n \"date\" text,\n \"candidates_nominated\" real,\n \"candidates_elected\" text,\n \"votes\" real,\n \"pct_of_national_vote\" real\n);\n\nQuestion: How many votes were tallied in 1956 with a % of national vote larger than 11.47?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"votes\") FROM \"lanka_sama_samaja_party_electoral_result\" WHERE \"date\"='1956' AND \"pct_of_national_vote\">11.47;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lanka_sama_samaja_party_electoral_result\" (\n \"date\" text,\n \"candidates_nominated\" real,\n \"candidates_elected\" text,\n \"votes\" real,\n \"pct_of_national_vote\" real\n);\n\nQuestion: How many candidates were nominated in 1952 with under 305,133 votes?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"candidates_nominated\") FROM \"lanka_sama_samaja_party_electoral_result\" WHERE \"date\"='1952' AND \"votes\"<'305,133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lanka_sama_samaja_party_electoral_result\" (\n \"date\" text,\n \"candidates_nominated\" real,\n \"candidates_elected\" text,\n \"votes\" real,\n \"pct_of_national_vote\" real\n);\n\nQuestion: How many votes were tallied with a % of national vote of 13.11, and over 39 candidates nominated?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"votes\") FROM \"lanka_sama_samaja_party_electoral_result\" WHERE \"pct_of_national_vote\"=13.11 AND \"candidates_nominated\">39;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Who is the visitor with a record of 14\u201317\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"record\"='14\u201317\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many in attendance when Penguins were home with a record of 14\u201319\u20136 with less than 34 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"home\"='penguins' AND \"record\"='14\u201319\u20136' AND \"points\"<34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which Format has a Catalog of 561 445-1?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='561 445-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which Region has a Date of early september 1999?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='early september 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which Region has a Date of early september 1999?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='early september 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game with a loss of White (4-5)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='white (4-5)';"
}
] |
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: what score has a location and attendance of montreal forum and the date of may 10?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"location_attendance\"='montreal forum' AND \"date\"='may 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminaries_scores\" (\n \"province\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: Which Interview has a Province of monte cristi and a Swimsuit larger than 7.27"
},
{
"role": "assistant",
"content": "SELECT SUM(\"interview\") FROM \"preliminaries_scores\" WHERE \"province\"='monte cristi' AND \"swimsuit\">7.27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminaries_scores\" (\n \"province\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: WHich Evening Gown has a Swimsuit smaller than 7.99 and a Interview larger than 7.98?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"evening_gown\") FROM \"preliminaries_scores\" WHERE \"swimsuit\"<7.99 AND \"interview\">7.98;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminaries_scores\" (\n \"province\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: Which Interview has a Swimsuit larger than 7.6, and a Province of la vega, and an Average smaller than 8.38?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"interview\") FROM \"preliminaries_scores\" WHERE \"swimsuit\">7.6 AND \"province\"='la vega' AND \"average\"<8.38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_13_2009\" (\n \"series_ep\" text,\n \"episode\" real,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which items in segment A have a segment D of marble sculptures?"
},
{
"role": "assistant",
"content": "SELECT \"segment_a\" FROM \"season_13_2009\" WHERE \"segment_d\"='marble sculptures';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_13_2009\" (\n \"series_ep\" text,\n \"episode\" real,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which segment A also has a segment D of kitchen shears?"
},
{
"role": "assistant",
"content": "SELECT \"segment_a\" FROM \"season_13_2009\" WHERE \"segment_d\"='kitchen shears';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_13_2009\" (\n \"series_ep\" text,\n \"episode\" real,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which items in segment C is episode 160?"
},
{
"role": "assistant",
"content": "SELECT \"segment_c\" FROM \"season_13_2009\" WHERE \"episode\"=160;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" text,\n \"episodes\" real,\n \"first_airdate\" text,\n \"last_airdate\" text,\n \"nielsen_ranking\" text\n);\n\nQuestion: Which season last aired on May 6, 1987?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"ratings\" WHERE \"last_airdate\"='may 6, 1987';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" text,\n \"episodes\" real,\n \"first_airdate\" text,\n \"last_airdate\" text,\n \"nielsen_ranking\" text\n);\n\nQuestion: What is the Nielsen ranking for Season 8?"
},
{
"role": "assistant",
"content": "SELECT \"nielsen_ranking\" FROM \"ratings\" WHERE \"season\"='season 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" text,\n \"episodes\" real,\n \"first_airdate\" text,\n \"last_airdate\" text,\n \"nielsen_ranking\" text\n);\n\nQuestion: What was the first airdate or the season that had less than 24 episodes and a Nielsen ranking of #38?"
},
{
"role": "assistant",
"content": "SELECT \"first_airdate\" FROM \"ratings\" WHERE \"episodes\"<24 AND \"nielsen_ranking\"='#38';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.