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 \"schedule\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is the record for Game 8?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"game\"='8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usage_share_data_from_wikimedia_visitor_\" (\n \"period\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text,\n \"other_mozilla\" text,\n \"mobile\" text\n);\n\nQuestion: What percentage of users were using mobile browsers during the period in which 2.62% were using Opera?"
},
{
"role": "assistant",
"content": "SELECT \"mobile\" FROM \"usage_share_data_from_wikimedia_visitor_\" WHERE \"opera\"='2.62%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usage_share_data_from_wikimedia_visitor_\" (\n \"period\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text,\n \"other_mozilla\" text,\n \"mobile\" text\n);\n\nQuestion: What percentage of users were using mobile browsers during the period in which 9.00% were using Chrome?"
},
{
"role": "assistant",
"content": "SELECT \"mobile\" FROM \"usage_share_data_from_wikimedia_visitor_\" WHERE \"chrome\"='9.00%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usage_share_data_from_wikimedia_visitor_\" (\n \"period\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text,\n \"other_mozilla\" text,\n \"mobile\" text\n);\n\nQuestion: What percentage of users were using Safari during the period in which 30.82% were using Firefox?"
},
{
"role": "assistant",
"content": "SELECT \"safari\" FROM \"usage_share_data_from_wikimedia_visitor_\" WHERE \"firefox\"='30.82%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usage_share_data_from_wikimedia_visitor_\" (\n \"period\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text,\n \"other_mozilla\" text,\n \"mobile\" text\n);\n\nQuestion: What percentage of users were using Internet Explorer during the period in which 2.1% were using mobile browsers?"
},
{
"role": "assistant",
"content": "SELECT \"internet_explorer\" FROM \"usage_share_data_from_wikimedia_visitor_\" WHERE \"mobile\"='2.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usage_share_data_from_wikimedia_visitor_\" (\n \"period\" text,\n \"internet_explorer\" text,\n \"firefox\" text,\n \"chrome\" text,\n \"safari\" text,\n \"opera\" text,\n \"other_mozilla\" text,\n \"mobile\" text\n);\n\nQuestion: What percentage of users were using other Mozilla browsers during the period in which 9.00% were using Chrome?"
},
{
"role": "assistant",
"content": "SELECT \"other_mozilla\" FROM \"usage_share_data_from_wikimedia_visitor_\" WHERE \"chrome\"='9.00%';"
}
]
|
[
{
"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 date has w 14-10 as the result?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 14-10';"
}
]
|
[
{
"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 opponent has a week less than 12, with November 25, 1965 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<12 AND \"date\"='november 25, 1965';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest week that has September 19, 1965 as the date, with an attendance less than 46,941?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='september 19, 1965' AND \"attendance\"<'46,941';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest week that has 51,499 as the attendance?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='51,499';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the result that has an attendance greater than 45,658, a week greater than 8, with baltimore colts as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'45,658' AND \"week\">8 AND \"opponent\"='baltimore colts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency for the active rock format?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"radio\" WHERE \"format\"='active rock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the branding for fm 88.9?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"radio\" WHERE \"frequency\"='fm 88.9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the name of the owner of rock 97.7?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"radio\" WHERE \"branding\"='rock 97.7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the branding for cbxp-fm?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"radio\" WHERE \"call_sign\"='cbxp-fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the call sign for country station fm 93.1?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"format\"='country' AND \"frequency\"='fm 93.1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency for the country station owned by Jim Pattison Group?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"radio\" WHERE \"format\"='country' AND \"owner\"='jim pattison group';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What game was located at the Los Angeles Memorial Sports Arena?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"location_attendance\"='los angeles memorial sports arena';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location for the game with a score of w 106-81?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"score\"='w 106-81';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Where is the location of Game 4?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"game\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the lane total when rank is 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"semifinal_1\" WHERE \"rank\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Gemma Spofforth has what time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_1\" WHERE \"name\"='gemma spofforth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_by_pinnacle_height\" (\n \"pinn_rank\" real,\n \"std_rank\" real,\n \"name\" text,\n \"pinnacle_height_ft_m\" text,\n \"standard_height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: Which Floors have a Pinnacle height ft (m) of 1,136 (346), and a Pinn Rank larger than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"floors\") FROM \"tallest_buildings_by_pinnacle_height\" WHERE \"pinnacle_height_ft_m\"='1,136 (346)' AND \"pinn_rank\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_by_pinnacle_height\" (\n \"pinn_rank\" real,\n \"std_rank\" real,\n \"name\" text,\n \"pinnacle_height_ft_m\" text,\n \"standard_height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: How much Standard Rank has a Name of 311 south wacker drive, and a Year larger than 1990?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"std_rank\") FROM \"tallest_buildings_by_pinnacle_height\" WHERE \"name\"='311 south wacker drive' AND \"year\">1990;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_by_pinnacle_height\" (\n \"pinn_rank\" real,\n \"std_rank\" real,\n \"name\" text,\n \"pinnacle_height_ft_m\" text,\n \"standard_height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: Which Floors have a Pinnacle height ft (m) of 995 (303), and an Std Rank larger than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"floors\") FROM \"tallest_buildings_by_pinnacle_height\" WHERE \"pinnacle_height_ft_m\"='995 (303)' AND \"std_rank\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_finals\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the average time with a rank lower than 2 for Andy Turner?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"time\") FROM \"semi_finals\" WHERE \"rank\">2 AND \"name\"='andy turner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"expansions_by_region\" (\n \"continent\" text,\n \"location\" text,\n \"city\" text,\n \"date\" text,\n \"year\" real\n);\n\nQuestion: What was the date for morocco when the year was lerger than 1981?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"expansions_by_region\" WHERE \"year\">1981 AND \"location\"='morocco';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"expansions_by_region\" (\n \"continent\" text,\n \"location\" text,\n \"city\" text,\n \"date\" text,\n \"year\" real\n);\n\nQuestion: What is the lowest year when the city is casablanca?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"expansions_by_region\" WHERE \"city\"='casablanca';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"expansions_by_region\" (\n \"continent\" text,\n \"location\" text,\n \"city\" text,\n \"date\" text,\n \"year\" real\n);\n\nQuestion: What year was the expansion in the city of San Juan?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"expansions_by_region\" WHERE \"city\"='san juan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"expansions_by_region\" (\n \"continent\" text,\n \"location\" text,\n \"city\" text,\n \"date\" text,\n \"year\" real\n);\n\nQuestion: What city was located in the Netherlands?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"expansions_by_region\" WHERE \"location\"='netherlands';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"expansions_by_region\" (\n \"continent\" text,\n \"location\" text,\n \"city\" text,\n \"date\" text,\n \"year\" real\n);\n\nQuestion: What location had a year of 1971 and a city of Tokyo?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"expansions_by_region\" WHERE \"year\"=1971 AND \"city\"='tokyo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"organization\" text,\n \"award\" text,\n \"work\" text,\n \"result\" text\n);\n\nQuestion: What award did they win before 2005?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"year\"<2005;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: When was Southend United the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"second_round_proper\" WHERE \"home_team\"='southend united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: For the game on 13 December 1975 with Halifax Town as the away team what was the score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"date\"='13 december 1975' AND \"away_team\"='halifax town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team when 6 was the tie no?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"second_round_proper\" WHERE \"tie_no\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: The game with 13 as the tie no had what as the score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"tie_no\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"old_northern_state_conference_membership\" (\n \"school_ihsaa_i_dnum\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: Which conference joined in 1954 with a beavers mascot?"
},
{
"role": "assistant",
"content": "SELECT \"conference_joined\" FROM \"old_northern_state_conference_membership\" WHERE \"year_joined\"=1954 AND \"mascot\"='beavers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the Romanji title for around40\u301c\u6ce8\u6587\u306e\u591a\u3044\u30aa\u30f3\u30ca\u305f\u3061\u301c on TBS?"
},
{
"role": "assistant",
"content": "SELECT \"romaji_title\" FROM \"2008_spring_season\" WHERE \"tv_station\"='tbs' AND \"japanese_title\"='around40\u301c\u6ce8\u6587\u306e\u591a\u3044\u30aa\u30f3\u30ca\u305f\u3061\u301c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What station has average ratings of 14.7%?"
},
{
"role": "assistant",
"content": "SELECT \"tv_station\" FROM \"2008_spring_season\" WHERE \"average_ratings\"='14.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the Japanese title for the episode bigger than 10 on TBS with average ratings of 14.8%?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_title\" FROM \"2008_spring_season\" WHERE \"episodes\">10 AND \"tv_station\"='tbs' AND \"average_ratings\"='14.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What episode has average ratings of 7.4%?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"episodes\") FROM \"2008_spring_season\" WHERE \"average_ratings\"='7.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the episode on Fuji TV titled Absolute Boyfriend?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"episodes\") FROM \"2008_spring_season\" WHERE \"tv_station\"='fuji tv' AND \"romaji_title\"='absolute boyfriend';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the episode on NHK with average ratings of 9.2%?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episodes\") FROM \"2008_spring_season\" WHERE \"tv_station\"='nhk' AND \"average_ratings\"='9.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"enrollment\" real,\n \"ihsaa_class_football_soccer\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which School has a Year Joined larger than 1926, and a Mascot of vikings?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"membership\" WHERE \"year_joined\">1926 AND \"mascot\"='vikings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"enrollment\" real,\n \"ihsaa_class_football_soccer\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which Mascot has a School of logansport community?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"membership\" WHERE \"school\"='logansport community';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"enrollment\" real,\n \"ihsaa_class_football_soccer\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which #/ County has an Enrollment larger than 1,108, and a School of anderson?"
},
{
"role": "assistant",
"content": "SELECT \"num_county\" FROM \"membership\" WHERE \"enrollment\">'1,108' AND \"school\"='anderson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"enrollment\" real,\n \"ihsaa_class_football_soccer\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which Previous Conference has an IHSAA Class/ Football/ Soccer of 4a/5a/2a, and a Year Joined larger than 1926?"
},
{
"role": "assistant",
"content": "SELECT \"previous_conference\" FROM \"membership\" WHERE \"ihsaa_class_football_soccer\"='4a/5a/2a' AND \"year_joined\">1926;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"num_county\" text,\n \"enrollment\" real,\n \"ihsaa_class_football_soccer\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which #/ County has a Year Joined larger than 1926, and a Previous Conference of olympic?"
},
{
"role": "assistant",
"content": "SELECT \"num_county\" FROM \"membership\" WHERE \"year_joined\">1926 AND \"previous_conference\"='olympic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Score of the 1996 Asian Cup Qualification on June 29, 1996?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='1996 asian cup qualification' AND \"date\"='june 29, 1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Venue of the King's Cup 1998?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='king''s cup 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Venue of the Competition with a Score of 4-1?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"score\"='4-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"resources\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"primary_conference\" text\n);\n\nQuestion: Which Enrollment has a Primary Conference of mid-hoosier, and a County of 16 decatur, and an IHSAA Class of aa?"
},
{
"role": "assistant",
"content": "SELECT \"enrollment\" FROM \"resources\" WHERE \"primary_conference\"='mid-hoosier' AND \"county\"='16 decatur' AND \"ihsaa_class\"='aa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"resources\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"primary_conference\" text\n);\n\nQuestion: Where is Indian Creek school located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"resources\" WHERE \"school\"='indian creek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"resources\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"primary_conference\" text\n);\n\nQuestion: Which school is located in trafalgar?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"resources\" WHERE \"location\"='trafalgar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"resources\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"primary_conference\" text\n);\n\nQuestion: Which IHSAA Class is located in charlottesville?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"resources\" WHERE \"location\"='charlottesville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Which country had notes of sa/b and a rank of 2?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"heat_1\" WHERE \"notes\"='sa/b' AND \"rank\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was the rank for Great Britain?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"heat_1\" WHERE \"country\"='great britain';"
}
]
|
[
{
"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: What was the tv time for the game on week 12?"
},
{
"role": "assistant",
"content": "SELECT \"tv_time\" FROM \"schedule\" WHERE \"week\"=12;"
}
]
|
[
{
"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: What was the attendance for the game against miami dolphins?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result of the game with 67,715 fans attending?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='67,715';"
}
]
|
[
{
"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: Who was the opponent for the game that had 90,287 in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='90,287';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Who had rahat as their 2008 club?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='rahat';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Who had rahat as their 2008 club?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='rahat';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What was the height of the player that had a 2008 club of iller bankasi?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='iller bankasi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_summary\" (\n \"period\" text,\n \"team\" text,\n \"goal\" text,\n \"assist_s\" text,\n \"time\" text,\n \"score\" text\n);\n\nQuestion: What is the team with 1st period at 12:37?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"scoring_summary\" WHERE \"period\"='1st' AND \"time\"='12:37';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: who is the athlete with the time 6:02.46?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"semifinal_a_b_2\" WHERE \"time\"='6:02.46';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the country for rank 6?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"semifinal_a_b_2\" WHERE \"rank\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the notes when the rank is less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"semifinal_a_b_2\" WHERE \"rank\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the rank for athlete hauffe, seifert, kaeufer, adamski?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"semifinal_a_b_2\" WHERE \"athlete\"='hauffe, seifert, kaeufer, adamski';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the notes for the time 6:05.21?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"semifinal_a_b_2\" WHERE \"time\"='6:05.21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possible_detached_objects\" (\n \"name\" text,\n \"diameter_km\" text,\n \"perihelion_au\" real,\n \"aphelion_au\" real,\n \"year_discovered\" real,\n \"discoverer_s\" text,\n \"type\" text\n);\n\nQuestion: Who was the discoverer of the object with an Aphelion above 97 in 2004?"
},
{
"role": "assistant",
"content": "SELECT \"discoverer_s\" FROM \"possible_detached_objects\" WHERE \"aphelion_au\">97 AND \"year_discovered\"=2004;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"haswell_h_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What model number has part number cl8064701510101?"
},
{
"role": "assistant",
"content": "SELECT \"model_number\" FROM \"haswell_h_quad_core_22_nm\" WHERE \"part_number_s\"='cl8064701510101';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"haswell_h_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the I/O bus entry for the processor with a release price of $657?"
},
{
"role": "assistant",
"content": "SELECT \"i_o_bus\" FROM \"haswell_h_quad_core_22_nm\" WHERE \"release_price_usd\"='$657';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"haswell_h_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the L2 cache for the processor with iris pro graphics 5200 and frequency of 2.6 ghz?"
},
{
"role": "assistant",
"content": "SELECT \"l2_cache\" FROM \"haswell_h_quad_core_22_nm\" WHERE \"gpu_model\"='iris pro graphics 5200' AND \"frequency\"='2.6 ghz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"haswell_h_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the frequency of the processor released at $383, with a sSpec of sr15f(c0)?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"haswell_h_quad_core_22_nm\" WHERE \"release_price_usd\"='$383' AND \"s_spec_number\"='sr15f(c0)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"haswell_h_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the GPU frequency for the processor released in June 2013, with a sSpec number of sr17l(c0)?"
},
{
"role": "assistant",
"content": "SELECT \"gpu_frequency\" FROM \"haswell_h_quad_core_22_nm\" WHERE \"release_date\"='june 2013' AND \"s_spec_number\"='sr17l(c0)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"haswell_h_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the L3 cache of the processor with a release price of $440?"
},
{
"role": "assistant",
"content": "SELECT \"l3_cache\" FROM \"haswell_h_quad_core_22_nm\" WHERE \"release_price_usd\"='$440';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"name\" text,\n \"license\" text,\n \"os_x\" text,\n \"unix_like\" text,\n \"windows\" text,\n \"web_interface\" text\n);\n\nQuestion: What is the OS X for the Home Media Center?"
},
{
"role": "assistant",
"content": "SELECT \"os_x\" FROM \"see_also\" WHERE \"name\"='home media center';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"name\" text,\n \"license\" text,\n \"os_x\" text,\n \"unix_like\" text,\n \"windows\" text,\n \"web_interface\" text\n);\n\nQuestion: What is the name when Windows is partial?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"see_also\" WHERE \"windows\"='partial';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"name\" text,\n \"license\" text,\n \"os_x\" text,\n \"unix_like\" text,\n \"windows\" text,\n \"web_interface\" text\n);\n\nQuestion: What is the license for Rygel?"
},
{
"role": "assistant",
"content": "SELECT \"license\" FROM \"see_also\" WHERE \"name\"='rygel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"name\" text,\n \"license\" text,\n \"os_x\" text,\n \"unix_like\" text,\n \"windows\" text,\n \"web_interface\" text\n);\n\nQuestion: What is the license for Jriver Media Center?"
},
{
"role": "assistant",
"content": "SELECT \"license\" FROM \"see_also\" WHERE \"name\"='jriver media center';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" real,\n \"first_aired\" text,\n \"last_aired\" text,\n \"episodes\" real,\n \"network\" text\n);\n\nQuestion: Of the series that last aired August 20, 2010, what is the lowest number of seasons?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"seasons\" WHERE \"last_aired\"='august 20, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" real,\n \"first_aired\" text,\n \"last_aired\" text,\n \"episodes\" real,\n \"network\" text\n);\n\nQuestion: Of the series that first aired April 8, 2011, what is the total number of episodes?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"episodes\") FROM \"seasons\" WHERE \"first_aired\"='april 8, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What's the total when the position was more than 6 and had an A Score of less than 7.6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"qualified_competitors\" WHERE \"position\">6 AND \"a_score\"<7.6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What's the total when A Score was less than 6.9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"qualified_competitors\" WHERE \"a_score\"<6.9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What's the total of Water (sqmi) with a Land (sqmi) of 35.918 and has a Longitude that is smaller than -97.115459?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"water_sqmi\") FROM \"d\" WHERE \"land_sqmi\"=35.918 AND \"longitude\"<-97.115459;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What;s the total of Longitude with an ANSI code of 1036573 and has Water (sqmi) that is smaller than 0.404?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"longitude\") FROM \"d\" WHERE \"ansi_code\"=1036573 AND \"water_sqmi\"<0.404;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What's the lowest listed longitude that has a Latitude of 46.843963 and Water (sqmi) that is smaller than 0.052000000000000005?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"longitude\") FROM \"d\" WHERE \"latitude\"=46.843963 AND \"water_sqmi\"<0.052000000000000005;"
}
]
|
[
{
"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 \"cyclist\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What is the total heat ranked higher than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"heat\") FROM \"semifinals\" WHERE \"rank\">7;"
}
]
|
[
{
"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 \"cyclist\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: Which cyclist is from Australia?"
},
{
"role": "assistant",
"content": "SELECT \"cyclist\" FROM \"semifinals\" WHERE \"nation\"='australia';"
}
]
|
[
{
"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 \"cyclist\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: Which nation has a heat of 4, and is ranked 8?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"semifinals\" WHERE \"heat\"=4 AND \"rank\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is John Curtice's position?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"first_round_selections\" WHERE \"player\"='john curtice';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What player is from Seton Hall University?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round_selections\" WHERE \"school\"='seton hall university';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the lowest pick of a player for the SS, P Position for the Minnesota Twins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"first_round_selections\" WHERE \"position\"='ss, p' AND \"team\"='minnesota twins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: what is the premier when the assumed office is 14 april 1894?"
},
{
"role": "assistant",
"content": "SELECT \"premier\" FROM \"rank_by_time_in_office\" WHERE \"assumed_office\"='14 april 1894';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: what is the rank when the assumed office is 9 april 1903?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"rank_by_time_in_office\" WHERE \"assumed_office\"='9 april 1903';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: what is the premier when the rank is 30?"
},
{
"role": "assistant",
"content": "SELECT \"premier\" FROM \"rank_by_time_in_office\" WHERE \"rank\"=30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: what is the total time in office when the assumed office is 1 november 1856?"
},
{
"role": "assistant",
"content": "SELECT \"total_time_in_office\" FROM \"rank_by_time_in_office\" WHERE \"assumed_office\"='1 november 1856';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: what is the rank when assumed office on 12 may 1857?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"rank_by_time_in_office\" WHERE \"assumed_office\"='12 may 1857';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_wmap_at_different_frequenc\" (\n \"property\" text,\n \"k_band\" real,\n \"ka_band\" real,\n \"q_band\" real,\n \"v_band\" real,\n \"w_band\" real\n);\n\nQuestion: What is the average v-band for Ka-band values under 33 and Q-bands of 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"v_band\") FROM \"properties_of_wmap_at_different_frequenc\" WHERE \"ka_band\"<33 AND \"q_band\"=1;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.