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 \"highest_grossing_films_of_1996\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What was the worldwide gross for the film directed by joe pytka?"
},
{
"role": "assistant",
"content": "SELECT \"worldwide_gross\" FROM \"highest_grossing_films_of_1996\" WHERE \"director\"='joe pytka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1996\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What was the average rank for the film directed by roland emmerich under the studio of 20th century fox?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"highest_grossing_films_of_1996\" WHERE \"studio\"='20th century fox' AND \"director\"='roland emmerich';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1996\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What is the average rank for the film directed by michael bay?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"highest_grossing_films_of_1996\" WHERE \"director\"='michael bay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_in_the_provinces\" (\n \"province\" text,\n \"largest_city\" text,\n \"2nd_largest\" text,\n \"3rd_largest\" text,\n \"4th_largest\" text\n);\n\nQuestion: What is the 3rd largest where the largest city is Ardabil?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_largest\" FROM \"largest_cities_in_the_provinces\" WHERE \"largest_city\"='ardabil';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_in_the_provinces\" (\n \"province\" text,\n \"largest_city\" text,\n \"2nd_largest\" text,\n \"3rd_largest\" text,\n \"4th_largest\" text\n);\n\nQuestion: What is the province where the 3rd largest is Savojbolagh?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"largest_cities_in_the_provinces\" WHERE \"3rd_largest\"='savojbolagh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_in_the_provinces\" (\n \"province\" text,\n \"largest_city\" text,\n \"2nd_largest\" text,\n \"3rd_largest\" text,\n \"4th_largest\" text\n);\n\nQuestion: What is the 4th largest where the 2nd largest is Minab?"
},
{
"role": "assistant",
"content": "SELECT \"4th_largest\" FROM \"largest_cities_in_the_provinces\" WHERE \"2nd_largest\"='minab';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_in_the_provinces\" (\n \"province\" text,\n \"largest_city\" text,\n \"2nd_largest\" text,\n \"3rd_largest\" text,\n \"4th_largest\" text\n);\n\nQuestion: In which province is the 3rd largest Dehbarez?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"largest_cities_in_the_provinces\" WHERE \"3rd_largest\"='dehbarez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_in_the_provinces\" (\n \"province\" text,\n \"largest_city\" text,\n \"2nd_largest\" text,\n \"3rd_largest\" text,\n \"4th_largest\" text\n);\n\nQuestion: What is the 3rd largest when 2nd largest in Minab?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_largest\" FROM \"largest_cities_in_the_provinces\" WHERE \"2nd_largest\"='minab';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_in_the_provinces\" (\n \"province\" text,\n \"largest_city\" text,\n \"2nd_largest\" text,\n \"3rd_largest\" text,\n \"4th_largest\" text\n);\n\nQuestion: What province has the largest city of Birjand?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"largest_cities_in_the_provinces\" WHERE \"largest_city\"='birjand';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score on september 28?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"date\"='september 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What date was the score 29-7?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"score\"='29-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: How much January has a Game smaller than 37, and an Opponent of detroit red wings?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"january\") FROM \"schedule_and_results\" WHERE \"game\"<37 AND \"opponent\"='detroit red wings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which January has an Opponent of toronto maple leafs?"
},
{
"role": "assistant",
"content": "SELECT \"january\" FROM \"schedule_and_results\" WHERE \"opponent\"='toronto maple leafs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which January has an Opponent of @ detroit red wings?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"january\") FROM \"schedule_and_results\" WHERE \"opponent\"='@ detroit red wings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"score\" text,\n \"attendance\" text,\n \"scorers\" text\n);\n\nQuestion: What date was the score won 1-2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"friendlies\" WHERE \"score\"='won 1-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"score\" text,\n \"attendance\" text,\n \"scorers\" text\n);\n\nQuestion: What was the score when Bornor Regis Town was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"friendlies\" WHERE \"opponent\"='bornor regis town';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"score\" text,\n \"attendance\" text,\n \"scorers\" text\n);\n\nQuestion: What is the number of people in attendance when Tonbridge Angels is the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"friendlies\" WHERE \"opponent\"='tonbridge angels';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"score\" text,\n \"attendance\" text,\n \"scorers\" text\n);\n\nQuestion: What is the score when the attendance shows TBC, and Sidley United was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"friendlies\" WHERE \"attendance\"='tbc' AND \"opponent\"='sidley united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"score\" text,\n \"attendance\" text,\n \"scorers\" text\n);\n\nQuestion: What is the score when the scorers show match report?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"friendlies\" WHERE \"scorers\"='match report';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"a_side\" text,\n \"b_side\" text,\n \"label\" text,\n \"us_pop\" text,\n \"album\" text\n);\n\nQuestion: Which Album has a Label of msb 801?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"singles\" WHERE \"label\"='msb 801';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"a_side\" text,\n \"b_side\" text,\n \"label\" text,\n \"us_pop\" text,\n \"album\" text\n);\n\nQuestion: Which Album has a Label of tumbleweed 1014?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"singles\" WHERE \"label\"='tumbleweed 1014';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the tie no was 12?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was the match against carlisle united?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='carlisle united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team when millwall was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"away_team\"='millwall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"country\" text,\n \"un_budget\" text,\n \"international_trade_millions_of_usd_2011\" real,\n \"gdp_nominal_millions_of_usd_2011\" real,\n \"gdp_ppp_millions_of_usd_2011\" real,\n \"population\" real\n);\n\nQuestion: What is International Trade (Millions of USD) 2011 when 2011 GDP is less than 471,890 and UN budget of 0.238% and GDP nominal less than 845,680?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"international_trade_millions_of_usd_2011\") FROM \"members\" WHERE \"gdp_ppp_millions_of_usd_2011\"<'471,890' AND \"un_budget\"='0.238%' AND \"gdp_nominal_millions_of_usd_2011\"<'845,680';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_career\" (\n \"event\" text,\n \"year\" real,\n \"category\" text,\n \"work\" text,\n \"outcome\" text\n);\n\nQuestion: What category was the nominated in after 2008?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"recording_career\" WHERE \"outcome\"='nominated' AND \"year\">2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_career\" (\n \"event\" text,\n \"year\" real,\n \"category\" text,\n \"work\" text,\n \"outcome\" text\n);\n\nQuestion: What year had the supernova award?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"recording_career\" WHERE \"category\"='supernova award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_career\" (\n \"event\" text,\n \"year\" real,\n \"category\" text,\n \"work\" text,\n \"outcome\" text\n);\n\nQuestion: What category was the winner in?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"recording_career\" WHERE \"outcome\"='winner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what is the country when the iata is gva?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"iata\"='gva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what is the country for the city of cardiff?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"city\"='cardiff';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what is the icao when the country is norway?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"country\"='norway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what is the city for the country of netherlands?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"country\"='netherlands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what is the airport when the city is d\u00fcsseldorf?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"destinations\" WHERE \"city\"='d\u00fcsseldorf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: what is the iata when the city is leipzig?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"city\"='leipzig';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record on February 23?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"february\"=23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_ascents_of_the_angliru\" (\n \"rank\" real,\n \"year\" real,\n \"ascent_time\" text,\n \"speed\" text,\n \"rider\" text\n);\n\nQuestion: What was the rank of the rider whose ascent time was 43:24 before the year 2002?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"fastest_ascents_of_the_angliru\" WHERE \"year\"<2002 AND \"ascent_time\"='43:24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_ascents_of_the_angliru\" (\n \"rank\" real,\n \"year\" real,\n \"ascent_time\" text,\n \"speed\" text,\n \"rider\" text\n);\n\nQuestion: Who is the rider that has a rank of less than 8 in the year 2000, and whose speed was 18.32 km/h?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"fastest_ascents_of_the_angliru\" WHERE \"rank\"<8 AND \"year\"=2000 AND \"speed\"='18.32 km/h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"comp_att\" text,\n \"pct\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: What is the number of completions and attempts taken in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"comp_att\" FROM \"college\" WHERE \"season\"='2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"comp_att\" text,\n \"pct\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: What is the completion/attempts value for the year with an average per game of 36.5?"
},
{
"role": "assistant",
"content": "SELECT \"comp_att\" FROM \"college\" WHERE \"avg_g\"='36.5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"comp_att\" text,\n \"pct\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: What is the long value for the year with an average/game of 160.9?"
},
{
"role": "assistant",
"content": "SELECT \"long\" FROM \"college\" WHERE \"avg_g\"='160.9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the highest attendance of February 7, 2009 and more than 49 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"date\"='february 7, 2009' AND \"points\">49;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which game has a number lower than 57 and more than 50 points?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"game_log\" WHERE \"game\"<57 AND \"points\">50;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What game in February 10, 2009 has the most points and a game number larger than 54?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"game_log\" WHERE \"date\"='february 10, 2009' AND \"game\">54;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_vs_sec_opponents\" (\n \"missouri_vs\" text,\n \"overall_record\" text,\n \"at_columbia\" text,\n \"at_opponent_s_venue\" text,\n \"at_neutral_site\" text,\n \"last_5_meetings\" text,\n \"last_10_meetings\" text,\n \"current_streak\" text,\n \"since_joining_sec\" text\n);\n\nQuestion: What's the opponent's venue result when the opponent is tennessee?"
},
{
"role": "assistant",
"content": "SELECT \"at_opponent_s_venue\" FROM \"record_vs_sec_opponents\" WHERE \"missouri_vs\"='tennessee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_vs_sec_opponents\" (\n \"missouri_vs\" text,\n \"overall_record\" text,\n \"at_columbia\" text,\n \"at_opponent_s_venue\" text,\n \"at_neutral_site\" text,\n \"last_5_meetings\" text,\n \"last_10_meetings\" text,\n \"current_streak\" text,\n \"since_joining_sec\" text\n);\n\nQuestion: What's the current streak with a last 10 meetings of lsu, 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"current_streak\" FROM \"record_vs_sec_opponents\" WHERE \"last_10_meetings\"='lsu, 2-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_vs_sec_opponents\" (\n \"missouri_vs\" text,\n \"overall_record\" text,\n \"at_columbia\" text,\n \"at_opponent_s_venue\" text,\n \"at_neutral_site\" text,\n \"last_5_meetings\" text,\n \"last_10_meetings\" text,\n \"current_streak\" text,\n \"since_joining_sec\" text\n);\n\nQuestion: What's the last 5 meetings with an opponent's venue result of vu, 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"last_5_meetings\" FROM \"record_vs_sec_opponents\" WHERE \"at_opponent_s_venue\"='vu, 2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finite_forms_of_garnu_to_do\" (\n \"simple_present_future\" text,\n \"probable_future\" text,\n \"simple_past\" text,\n \"past_habitual\" text,\n \"injunctive\" text,\n \"imperative\" text\n);\n\nQuestion: What is the probable future word for the simple present/future word high grade?"
},
{
"role": "assistant",
"content": "SELECT \"probable_future\" FROM \"finite_forms_of_garnu_to_do\" WHERE \"simple_present_future\"='high grade';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finite_forms_of_garnu_to_do\" (\n \"simple_present_future\" text,\n \"probable_future\" text,\n \"simple_past\" text,\n \"past_habitual\" text,\n \"injunctive\" text,\n \"imperative\" text\n);\n\nQuestion: What is the injunctive for the Simple Past of \u0917\u0930\u0941\u0901\u0932\u093e gar\u0169l\u0101 'I will (probably) do'?"
},
{
"role": "assistant",
"content": "SELECT \"injunctive\" FROM \"finite_forms_of_garnu_to_do\" WHERE \"simple_past\"='\u0917\u0930\u0941\u0901\u0932\u093e gar\u0169l\u0101 ''i will (probably) do''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What is the date of taking office for Giorgia Meloni?"
},
{
"role": "assistant",
"content": "SELECT \"took_office\" FROM \"ministers_without_portfolio\" WHERE \"minister\"='giorgia meloni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ministers_without_portfolio\" (\n \"portfolio\" text,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: Which party was Andrea Ronchi from?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"ministers_without_portfolio\" WHERE \"minister\"='andrea ronchi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the lowest Division, when Team is \"Benfica\", and when Apps is 22?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"division\") FROM \"club_statistics\" WHERE \"team\"='benfica' AND \"apps\"=22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What Championship had a winning score of 69-71-67-68=275?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"wins_5\" WHERE \"winning_score\"='69-71-67-68=275';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What is the smallest winner's share for the LPGA championship?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"winner_s_share\") FROM \"wins_5\" WHERE \"championship\"='lpga championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is Jockey, when Time is 1:15.89?"
},
{
"role": "assistant",
"content": "SELECT \"jockey\" FROM \"winners_since_2000\" WHERE \"time\"='1:15.89';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is Time, when Jockey is John Velazquez, and when Trainer is Todd A. Pletcher?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"winners_since_2000\" WHERE \"jockey\"='john velazquez' AND \"trainer\"='todd a. pletcher';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is Winner, when Year is 2001?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners_since_2000\" WHERE \"year\"=2001;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is Jockey, when Winner is Alke?"
},
{
"role": "assistant",
"content": "SELECT \"jockey\" FROM \"winners_since_2000\" WHERE \"winner\"='alke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average laps for the +50.653 time?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"time\"='+50.653';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"place\" real,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"difference\" text,\n \"points\" real\n);\n\nQuestion: What is the highest Matches were the points were smaller than 8, the place was larger than 13, and the drawn is less than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"table\" WHERE \"points\"<8 AND \"place\">13 AND \"drawn\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"place\" real,\n \"matches\" real,\n \"drawn\" real,\n \"lost\" real,\n \"difference\" text,\n \"points\" real\n);\n\nQuestion: What is the average points when the drawn is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"table\" WHERE \"drawn\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was Turkey's lowest gold when there were less than 2 bronze?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"nation\"='turkey' AND \"bronze\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"rank\" text,\n \"administrative_division\" text,\n \"area_km\" real,\n \"area_sq_mi\" real,\n \"national_share_pct\" real,\n \"comparable_country\" text\n);\n\nQuestion: What is the average area in square miles for the division that is 9,630,960 square kilometers with a national share larger than 100%?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_sq_mi\") FROM \"notes\" WHERE \"area_km\"='9,630,960' AND \"national_share_pct\">100;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"rank\" text,\n \"administrative_division\" text,\n \"area_km\" real,\n \"area_sq_mi\" real,\n \"national_share_pct\" real,\n \"comparable_country\" text\n);\n\nQuestion: What is the average area in square miles for the hunan administrative division with a national share less than 2.19%?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_sq_mi\") FROM \"notes\" WHERE \"administrative_division\"='hunan' AND \"national_share_pct\"<2.19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"rank\" text,\n \"administrative_division\" text,\n \"area_km\" real,\n \"area_sq_mi\" real,\n \"national_share_pct\" real,\n \"comparable_country\" text\n);\n\nQuestion: What is the average square kilometer area of the division that has a 2,448 square mile area and a national share larger than 0.065%?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_km\") FROM \"notes\" WHERE \"area_sq_mi\"='2,448' AND \"national_share_pct\">0.065;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Central Michigan's average overall when the pick was 8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='central michigan' AND \"pick\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the record when the opponent is jeff williams?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jeff williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the method for round 1 and the opponent is bobby mcmaster?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"opponent\"='bobby mcmaster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the location when the time is 3:15?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='3:15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the record when the round is before 3 and the time si 4:59?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"time\"='4:59';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the record when the event is shido usa mma and the opponent is raphael assun\u00e7\u00e3o?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='shido usa mma' AND \"opponent\"='raphael assun\u00e7\u00e3o';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: How much money did Ben Crenshaw earn?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"player\"='ben crenshaw';"
}
] |
[
{
"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 competition when the score is 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='2-1';"
}
] |
[
{
"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 when the score is 10-0 on 1997-06-22?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"score\"='10-0' AND \"date\"='1997-06-22';"
}
] |
[
{
"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 when the competition is 1996 afc asian cup group stage?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='1996 afc asian cup group stage';"
}
] |
[
{
"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 competition when the date is 1995-08-06?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='1995-08-06';"
}
] |
[
{
"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 \"channel\" text,\n \"attendance\" text\n);\n\nQuestion: What is the total number of weeks that the Giants played against the Dallas Cowboys?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='dallas cowboys';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: Which Home has an Away of hispano?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_15\" WHERE \"away\"='hispano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: What engine has the Mercedes AMG Petronas f1 team, and 93 points?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"entrant\"='mercedes amg petronas f1 team' AND \"points\"='93';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" text\n);\n\nQuestion: Which Chassis has 4 points?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"points\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_17_titles_4_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Opponent, when Year is greater than 2009, and when Score is 7\u20135, 6\u20137 (6\u20138) , 6\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_21_17_titles_4_runner_ups\" WHERE \"year\">2009 AND \"score\"='7\u20135, 6\u20137 (6\u20138) , 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_17_titles_4_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the lowest Year, when Surface is Hard, and when Opponent is Dinara Safina?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"singles_21_17_titles_4_runner_ups\" WHERE \"surface\"='hard' AND \"opponent\"='dinara safina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_17_titles_4_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Surface, when Championship is Australian Open?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_21_17_titles_4_runner_ups\" WHERE \"championship\"='australian open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_17_titles_4_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is Outcome, when Opponent is Victoria Azarenka, and when Score is 6\u20132, 2\u20136, 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_21_17_titles_4_runner_ups\" WHERE \"opponent\"='victoria azarenka' AND \"score\"='6\u20132, 2\u20136, 7\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_and_blu_ray_releases\" (\n \"release_title\" text,\n \"series\" text,\n \"no_of_dv_ds\" text,\n \"no_of_blu_ray_discs\" text,\n \"release_date\" text,\n \"episode_no\" text,\n \"region_no\" real,\n \"released_by\" text\n);\n\nQuestion: WHAT SERIES WAS RELEASED BY ITV STUDIOS AND A RELEASE DATE OF AUGUST 15, 2012?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"dvd_and_blu_ray_releases\" WHERE \"released_by\"='itv studios' AND \"release_date\"='august 15, 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_and_blu_ray_releases\" (\n \"release_title\" text,\n \"series\" text,\n \"no_of_dv_ds\" text,\n \"no_of_blu_ray_discs\" text,\n \"release_date\" text,\n \"episode_no\" text,\n \"region_no\" real,\n \"released_by\" text\n);\n\nQuestion: WHAT IS THE EPISODE NUMBER THAT HAS 28 DVD?"
},
{
"role": "assistant",
"content": "SELECT \"episode_no\" FROM \"dvd_and_blu_ray_releases\" WHERE \"no_of_dv_ds\"='28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_and_blu_ray_releases\" (\n \"release_title\" text,\n \"series\" text,\n \"no_of_dv_ds\" text,\n \"no_of_blu_ray_discs\" text,\n \"release_date\" text,\n \"episode_no\" text,\n \"region_no\" real,\n \"released_by\" text\n);\n\nQuestion: WHAT EPISODE HAS A REGION NUMBER BIGGER THAN 1, AND 32 DVDS?"
},
{
"role": "assistant",
"content": "SELECT \"episode_no\" FROM \"dvd_and_blu_ray_releases\" WHERE \"region_no\">1 AND \"no_of_dv_ds\"='32';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"k\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Who was the player from Duke?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"k\" WHERE \"from\"='duke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_alt_flights\" (\n \"test_flight\" text,\n \"date\" text,\n \"speed\" text,\n \"altitude\" text,\n \"crew\" text,\n \"duration\" text,\n \"comment\" text\n);\n\nQuestion: What is Duration, when Test Flight is Taxi Test #2?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"list_of_alt_flights\" WHERE \"test_flight\"='taxi test #2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_alt_flights\" (\n \"test_flight\" text,\n \"date\" text,\n \"speed\" text,\n \"altitude\" text,\n \"crew\" text,\n \"duration\" text,\n \"comment\" text\n);\n\nQuestion: What it Duration, when Test Flight is Free Flight #3?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"list_of_alt_flights\" WHERE \"test_flight\"='free flight #3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_alt_flights\" (\n \"test_flight\" text,\n \"date\" text,\n \"speed\" text,\n \"altitude\" text,\n \"crew\" text,\n \"duration\" text,\n \"comment\" text\n);\n\nQuestion: What is Date, when Comment is Tailcone On, Lakebed Landing, and when Duration is 5min 34 s?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"list_of_alt_flights\" WHERE \"comment\"='tailcone on, lakebed landing' AND \"duration\"='5min 34 s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_alt_flights\" (\n \"test_flight\" text,\n \"date\" text,\n \"speed\" text,\n \"altitude\" text,\n \"crew\" text,\n \"duration\" text,\n \"comment\" text\n);\n\nQuestion: What is Crew, when Date is July 26, 1977?"
},
{
"role": "assistant",
"content": "SELECT \"crew\" FROM \"list_of_alt_flights\" WHERE \"date\"='july 26, 1977';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is Years, when Nationality is United States, and when Position is PG / SG?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"r\" WHERE \"nationality\"='united states' AND \"position\"='pg / sg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is Nationality, when Years is 1979?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"r\" WHERE \"years\"='1979';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" real,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is From, when Player is Jackie Robinson Category:Articles With Hcards?"
},
{
"role": "assistant",
"content": "SELECT \"from\" FROM \"r\" WHERE \"player\"='jackie robinson 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 \"scoring_summary\" (\n \"period\" text,\n \"team\" text,\n \"goal\" text,\n \"time\" text,\n \"score\" text\n);\n\nQuestion: WHAT SCORE HAS A TIME OF 18:27?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"scoring_summary\" WHERE \"time\"='18:27';"
}
] |
[
{
"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 \"time\" text,\n \"score\" text\n);\n\nQuestion: WHAT GOAL HAS A TIME OF 39:37?"
},
{
"role": "assistant",
"content": "SELECT \"goal\" FROM \"scoring_summary\" WHERE \"time\"='39:37';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_of_office\" text\n);\n\nQuestion: What is Electorate, when Party is \"Country\", when State is \"WA\", and when Member is \"John Hallett\"?"
},
{
"role": "assistant",
"content": "SELECT \"electorate\" FROM \"see_also\" WHERE \"party\"='country' AND \"state\"='wa' AND \"member\"='john hallett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_of_office\" text\n);\n\nQuestion: What is Term of Office, when Member is \"Dominic Costa\"?"
},
{
"role": "assistant",
"content": "SELECT \"term_of_office\" FROM \"see_also\" WHERE \"member\"='dominic costa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_of_office\" text\n);\n\nQuestion: What is State, when Member is \"Gil Duthie\"?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"see_also\" WHERE \"member\"='gil duthie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stockholm_derbies\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"attendance\" text\n);\n\nQuestion: What was the number of attendance at Stadion with a score of 2-0"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"stockholm_derbies\" WHERE \"venue\"='stadion' AND \"score\"='2-0';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.