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\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: How many opponents were there when the opponent was Arizona State?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"opponents\") FROM \"schedule\" WHERE \"opponent\"='Arizona State';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: How many records show Utah as the opponent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"record\") FROM \"schedule\" WHERE \"opponent\"='Utah';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: How many opponents are there when cowboy points were 10?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"schedule\" WHERE \"cowboys_points\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: How many records were there when opponents were 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"record\") FROM \"schedule\" WHERE \"opponents\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: Name the number of record for 12 cowboys points"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"record\") FROM \"schedule\" WHERE \"cowboys_points\"=12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: Name the most game for record 4-0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"schedule\" WHERE \"record\"='4-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: Name the result for cowboys points being 23"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"schedule\" WHERE \"cowboys_points\"=23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"cowboys_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: Name the record for arizona"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"opponent\"='Arizona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: Name the unemployment rate for 34024"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"unemployment_rate\") FROM \"list_of_appalachian_regional_commission_\" WHERE \"population\"=34024;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: Name the total number of population for craig"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population\") FROM \"list_of_appalachian_regional_commission_\" WHERE \"county\"='Craig';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: Name the unemployment rate for botetourt"
},
{
"role": "assistant",
"content": "SELECT \"unemployment_rate\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"county\"='Botetourt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: Name the status for unemployment rate being 6.7%"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"unemployment_rate\"='6.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the county that has a 14.7% poverty rate?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"poverty_rate\"='14.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the poverty rate in the county that has a market income per capita of $16,420?"
},
{
"role": "assistant",
"content": "SELECT \"poverty_rate\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"market_income_per_capita\"='$16,420';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the lowest population in a county with market income per capita of $24,383?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population\") FROM \"list_of_appalachian_regional_commission_\" WHERE \"market_income_per_capita\"='$24,383';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the povery rate of the county with market income per capita of $20,518?"
},
{
"role": "assistant",
"content": "SELECT \"poverty_rate\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"market_income_per_capita\"='$20,518';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: what is the market income per capita where the county is hancock?"
},
{
"role": "assistant",
"content": "SELECT \"market_income_per_capita\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"county\"='Hancock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: what is the county where the market income per capita is $25,006?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"market_income_per_capita\"='$25,006';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: what is the unemployment rate where the market income per capita is $16,406?"
},
{
"role": "assistant",
"content": "SELECT \"unemployment_rate\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"market_income_per_capita\"='$16,406';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: what is the unemployment rate for wayne county?"
},
{
"role": "assistant",
"content": "SELECT \"unemployment_rate\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"county\"='Wayne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_22815870_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the original air date of the episode with a production code of 105? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_22815870_1\" WHERE \"prod_code\"=105;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_22815870_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the original air date of the episode titled \"Pilot\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_22815870_1\" WHERE \"title\"='\\\"Pilot\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_22815870_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: Who wrote the episode titled \"Christmas\"? "
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_22815870_1\" WHERE \"title\"='\\\"Christmas\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_22815870_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the production code of the episode titled \"Lenny\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"prod_code\") FROM \"table1_22815870_1\" WHERE \"title\"='\\\"Lenny\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_22815870_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the original air date of the episode titled \"Mom at the Bar/Train Buddy\" that was written b Adrienne Carter? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_22815870_1\" WHERE \"written_by\"='Adrienne Carter' AND \"title\"='\\\"Mom at the Bar/Train Buddy\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_22815870_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the original air date of the episode titled \"Commercial/Coach DMV\"? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_22815870_1\" WHERE \"title\"='\\\"Commercial/Coach DMV\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: How many counties have a population of 2266?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"county\") FROM \"list_of_appalachian_regional_commission_\" WHERE \"population\"=2266;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: How many statuses are listed for Wayne county? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"status\") FROM \"list_of_appalachian_regional_commission_\" WHERE \"county\"='Wayne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the market income per capita in a county where the status is distressed and the unemployment rate is at 10.5%? "
},
{
"role": "assistant",
"content": "SELECT \"market_income_per_capita\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"status\"='Distressed' AND \"unemployment_rate\"='10.5%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the status for all the counties that have a poverty rate of 36.6%? "
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"poverty_rate\"='36.6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the status if the poverty rate is 11.4%?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"poverty_rate\"='11.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: If the poverty rate is 12.9%, what is the county?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"poverty_rate\"='12.9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What is the population maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population\") FROM \"list_of_appalachian_regional_commission_\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: What county is the unemployment rate 4.8%?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"unemployment_rate\"='4.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_appalachian_regional_commission_\" (\n \"county\" text,\n \"population\" real,\n \"unemployment_rate\" text,\n \"market_income_per_capita\" text,\n \"poverty_rate\" text,\n \"status\" text\n);\n\nQuestion: If the poverty rate is 12.9%, what is the market income per capita?"
},
{
"role": "assistant",
"content": "SELECT \"market_income_per_capita\" FROM \"list_of_appalachian_regional_commission_\" WHERE \"poverty_rate\"='12.9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings_chart\" (\n \"order\" real,\n \"episode\" text,\n \"airdate\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_night\" real\n);\n\nQuestion: Name the viewers for 2.1 rating"
},
{
"role": "assistant",
"content": "SELECT \"viewers_millions\" FROM \"ratings_chart\" WHERE \"rating\"='2.1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings_chart\" (\n \"order\" real,\n \"episode\" text,\n \"airdate\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_night\" real\n);\n\nQuestion: Name the most share for 2.76 million viewers "
},
{
"role": "assistant",
"content": "SELECT MAX(\"share\") FROM \"ratings_chart\" WHERE \"viewers_millions\"='2.76';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings_chart\" (\n \"order\" real,\n \"episode\" text,\n \"airdate\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_night\" real\n);\n\nQuestion: Name the viewers for 1.2/4 rating"
},
{
"role": "assistant",
"content": "SELECT \"viewers_millions\" FROM \"ratings_chart\" WHERE \"rating_share_18_49\"='1.2/4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings_chart\" (\n \"order\" real,\n \"episode\" text,\n \"airdate\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_night\" real\n);\n\nQuestion: Name the rating for 3.79 viewers"
},
{
"role": "assistant",
"content": "SELECT \"rating_share_18_49\" FROM \"ratings_chart\" WHERE \"viewers_millions\"='3.79';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"r\" real,\n \"player\" text,\n \"scottish_premier_league\" real,\n \"scottish_cup\" real,\n \"scottish_league_cup\" real,\n \"champions_league_qualifying\" real,\n \"europa_league\" real,\n \"total\" real\n);\n\nQuestion: Name the least europa league"
},
{
"role": "assistant",
"content": "SELECT MIN(\"europa_league\") FROM \"top_scorers\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"r\" real,\n \"player\" text,\n \"scottish_premier_league\" real,\n \"scottish_cup\" real,\n \"scottish_league_cup\" real,\n \"champions_league_qualifying\" real,\n \"europa_league\" real,\n \"total\" real\n);\n\nQuestion: Name the max total for aiden mcgeady"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"top_scorers\" WHERE \"player\"='Aiden McGeady';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"r\" real,\n \"player\" text,\n \"scottish_premier_league\" real,\n \"scottish_cup\" real,\n \"scottish_league_cup\" real,\n \"champions_league_qualifying\" real,\n \"europa_league\" real,\n \"total\" real\n);\n\nQuestion: Name the scottish premier league georgios samaras"
},
{
"role": "assistant",
"content": "SELECT \"scottish_premier_league\" FROM \"top_scorers\" WHERE \"player\"='Georgios Samaras';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"r\" real,\n \"player\" text,\n \"scottish_premier_league\" real,\n \"scottish_cup\" real,\n \"scottish_league_cup\" real,\n \"champions_league_qualifying\" real,\n \"europa_league\" real,\n \"total\" real\n);\n\nQuestion: Name the total number of r for josh thompson"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"r\") FROM \"top_scorers\" WHERE \"player\"='Josh Thompson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the total number of rebounds on november 27?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"high_rebounds\") FROM \"game_log\" WHERE \"date\"='November 27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: On what date did the Pistons play @ toronto?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"team\"='@ Toronto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: List the location and number of fans in attendance for game 7/"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"location_attendance\") FROM \"game_log\" WHERE \"game\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many interceptions for the team who played 31 games?"
},
{
"role": "assistant",
"content": "SELECT \"steals\" FROM \"player_stats\" WHERE \"games_played\"=31;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many steals for the player who had 121 rebounds?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"steals\") FROM \"player_stats\" WHERE \"rebounds\"=121;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What date was the Piston's record at 23-47?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='23-47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the highest rebounds during the game with a record of 23-47?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"record\"='23-47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many rebound did the person who scored 147 points have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rebounds\") FROM \"player_stats\" WHERE \"points\"=147;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Of the players with 50 free throws, what is the lowest number of three pointers?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"three_pointers\") FROM \"player_stats\" WHERE \"free_throws\"=50;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Who are all the players with 156 rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"player_stats\" WHERE \"rebounds\"=156;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Of the players who scored 5 three pointers, what is the highest number of games played?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"games_played\") FROM \"player_stats\" WHERE \"three_pointers\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"hometown\" text,\n \"class\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What is every number for the hometown of Canton, Illinois?"
},
{
"role": "assistant",
"content": "SELECT \"no\" FROM \"roster\" WHERE \"hometown\"='Canton, Illinois';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"hometown\" text,\n \"class\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: Who is every player with a height of 6-5?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"roster\" WHERE \"height\"='6-5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"hometown\" text,\n \"class\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: Who are all players from hometown of Carbondale, Illinois?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"roster\" WHERE \"hometown\"='Carbondale, Illinois';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"hometown\" text,\n \"class\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What is every class with a position of guard and Tal Brody as the player?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"roster\" WHERE \"position\"='Guard' AND \"player\"='Tal Brody';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"hometown\" text,\n \"class\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: How many values for number occur with the hometown of Canton, Illinois?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no\") FROM \"roster\" WHERE \"hometown\"='Canton, Illinois';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text\n);\n\nQuestion: What class was ren alde?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"roster\" WHERE \"player\"='Ren Alde';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text\n);\n\nQuestion: Who are the player's who weighed 170?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"roster\" WHERE \"weight\"=170;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"no\" real,\n \"player\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text\n);\n\nQuestion: What is jim dutcher's hometown?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"roster\" WHERE \"player\"='Jim Dutcher';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Name the total number of player for 51 points"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"player\") FROM \"player_stats\" WHERE \"points\"=51;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Name the most rebounds for larry smith"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rebounds\") FROM \"player_stats\" WHERE \"player\"='Larry Smith';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Name the steals for 5 blocks"
},
{
"role": "assistant",
"content": "SELECT \"steals\" FROM \"player_stats\" WHERE \"blocks\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: Name the least points"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"player_stats\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"magnetic_properties\" (\n \"magnet\" text,\n \"b_r_t\" text,\n \"h_ci_k_a_m\" text,\n \"bh_max_k_j_m_3\" text,\n \"t_c_c\" text\n);\n\nQuestion: When 0.6\u20131.4 is the b r (t) what is the h ci (ka/m)?"
},
{
"role": "assistant",
"content": "SELECT \"h_ci_k_a_m\" FROM \"magnetic_properties\" WHERE \"b_r_t\"='0.6\u20131.4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"magnetic_properties\" (\n \"magnet\" text,\n \"b_r_t\" text,\n \"h_ci_k_a_m\" text,\n \"bh_max_k_j_m_3\" text,\n \"t_c_c\" text\n);\n\nQuestion: When nd 2 fe 14 b (bonded) is the magnet how many measurements of tc (\u00b0c)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"t_c_c\") FROM \"magnetic_properties\" WHERE \"magnet\"='Nd 2 Fe 14 B (bonded)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"magnetic_properties\" (\n \"magnet\" text,\n \"b_r_t\" text,\n \"h_ci_k_a_m\" text,\n \"bh_max_k_j_m_3\" text,\n \"t_c_c\" text\n);\n\nQuestion: When 720 is the t c (\u00b0c) what is the h ci (ka/m)?"
},
{
"role": "assistant",
"content": "SELECT \"h_ci_k_a_m\" FROM \"magnetic_properties\" WHERE \"t_c_c\"='720';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conference_standings\" (\n \"team\" text,\n \"sec_wins\" real,\n \"sec_losses\" real,\n \"percentage\" text,\n \"home_record\" text,\n \"road_record\" text,\n \"overall_record\" text\n);\n\nQuestion: Name the sec wins for .357 percentage and 4-3 home record"
},
{
"role": "assistant",
"content": "SELECT \"sec_wins\" FROM \"conference_standings\" WHERE \"percentage\"='.357' AND \"home_record\"='4-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conference_standings\" (\n \"team\" text,\n \"sec_wins\" real,\n \"sec_losses\" real,\n \"percentage\" text,\n \"home_record\" text,\n \"road_record\" text,\n \"overall_record\" text\n);\n\nQuestion: Name the percentage for georgia"
},
{
"role": "assistant",
"content": "SELECT \"percentage\" FROM \"conference_standings\" WHERE \"team\"='Georgia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conference_standings\" (\n \"team\" text,\n \"sec_wins\" real,\n \"sec_losses\" real,\n \"percentage\" text,\n \"home_record\" text,\n \"road_record\" text,\n \"overall_record\" text\n);\n\nQuestion: Name the overall record for road record being 4-3"
},
{
"role": "assistant",
"content": "SELECT \"overall_record\" FROM \"conference_standings\" WHERE \"road_record\"='4-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conference_standings\" (\n \"team\" text,\n \"sec_wins\" real,\n \"sec_losses\" real,\n \"percentage\" text,\n \"home_record\" text,\n \"road_record\" text,\n \"overall_record\" text\n);\n\nQuestion: Name the number of road record for team ole miss"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"road_record\") FROM \"conference_standings\" WHERE \"team\"='Ole Miss';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conference_standings\" (\n \"team\" text,\n \"sec_wins\" real,\n \"sec_losses\" real,\n \"percentage\" text,\n \"home_record\" text,\n \"road_record\" text,\n \"overall_record\" text\n);\n\nQuestion: Name the percentage for ole miss"
},
{
"role": "assistant",
"content": "SELECT \"percentage\" FROM \"conference_standings\" WHERE \"team\"='Ole Miss';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: What is the most number of blocks kendall gill had?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"blocks\") FROM \"player_stats\" WHERE \"player\"='Kendall Gill';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest number of three pointers in games where the number of rebounds was 178?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"three_pointers\") FROM \"player_stats\" WHERE \"rebounds\"=178;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many steals were the in games that andy kaufmann played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"steals\") FROM \"player_stats\" WHERE \"player\"='Andy Kaufmann';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest number of three pointers in games that kendall gill played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"three_pointers\") FROM \"player_stats\" WHERE \"player\"='Kendall Gill';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many games had three pointers where the number of points was 581?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"three_pointers\") FROM \"player_stats\" WHERE \"points\"=581;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: How many timeslots were available for the season finale on August 29, 2009?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"timeslot_et\") FROM \"seasonal_ratings\" WHERE \"season_finale\"='August 29, 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What was the highest amount of episodes for the season with 5.74 million viewers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episodes\") FROM \"seasonal_ratings\" WHERE \"viewers_in_millions\"='5.74';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What rank number had a season premiere on December 24, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"seasonal_ratings\" WHERE \"season_premiere\"='December 24, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: How many rankings were there for the season with a finale on August 20, 2011?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"seasonal_ratings\" WHERE \"season_finale\"='August 20, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: How many episodes had a season premiere on December 11, 2010?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episodes\") FROM \"seasonal_ratings\" WHERE \"season_premiere\"='December 11, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasonal_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What was the season number that had a premiere on December 11, 2010?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"seasonal_ratings\" WHERE \"season_premiere\"='December 11, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_19_11_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which surfaces have the final score of 6\u20131, 6\u20137 (2\u20137) , 7\u20136 (7\u20135) , 7\u20136 (10\u20138)?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_19_11_titles_8_runner_ups\" WHERE \"score_in_the_final\"='6\u20131, 6\u20137 (2\u20137) , 7\u20136 (7\u20135) , 7\u20136 (10\u20138)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_19_11_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many outcome have a score of 7\u20136 (9\u20137) , 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"outcome\") FROM \"singles_19_11_titles_8_runner_ups\" WHERE \"score_in_the_final\"='7\u20136 (9\u20137) , 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_19_11_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which outcomes have a final score of 6\u20133, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_19_11_titles_8_runner_ups\" WHERE \"score_in_the_final\"='6\u20133, 6\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_19_11_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the last year that Andre Agassi was the final opponent?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"singles_19_11_titles_8_runner_ups\" WHERE \"opponent_in_the_final\"='Andre Agassi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_19_11_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many years have a final score of 6\u20133, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"singles_19_11_titles_8_runner_ups\" WHERE \"score_in_the_final\"='6\u20133, 6\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_19_11_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which championship has a final score of 6\u20137 (9\u201311) , 6\u20134, 7\u20135, 4\u20136, 4\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"singles_19_11_titles_8_runner_ups\" WHERE \"score_in_the_final\"='6\u20137 (9\u201311) , 6\u20134, 7\u20135, 4\u20136, 4\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_tour_career_earnings\" (\n \"year\" real,\n \"majors\" real,\n \"atp_wins\" real,\n \"total_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: How many years had a total earnings amount of 2254598?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"atp_tour_career_earnings\" WHERE \"earnings\"=2254598;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_tour_career_earnings\" (\n \"year\" real,\n \"majors\" real,\n \"atp_wins\" real,\n \"total_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: What is the latest year that data is available for?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"atp_tour_career_earnings\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_5_titles_1_runner_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the score in the final in the year 1994?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"singles_6_5_titles_1_runner_up\" WHERE \"year\"=1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_5_titles_1_runner_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who is the championship for the year of 1993?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"singles_6_5_titles_1_runner_up\" WHERE \"year\"=1993;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_5_titles_1_runner_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who is the opponent in the final when frankfurt is championship and the year is less than 1993.0?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_6_5_titles_1_runner_up\" WHERE \"championship\"='Frankfurt' AND \"year\"<1993.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_tour_career_earnings\" (\n \"year\" real,\n \"majors\" real,\n \"atp_wins\" real,\n \"total_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: In what year was his money list rank 3? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"atp_tour_career_earnings\" WHERE \"money_list_rank\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_tour_career_earnings\" (\n \"year\" real,\n \"majors\" real,\n \"atp_wins\" real,\n \"total_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: What was his money list rank in 2001? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"money_list_rank\") FROM \"atp_tour_career_earnings\" WHERE \"year\"=2001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_tour_career_earnings\" (\n \"year\" real,\n \"majors\" real,\n \"atp_wins\" real,\n \"total_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: How many atp wins did he have when his money list rank was 4? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"atp_wins\") FROM \"atp_tour_career_earnings\" WHERE \"money_list_rank\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_tour_career_earnings\" (\n \"year\" real,\n \"majors\" real,\n \"atp_wins\" real,\n \"total_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real\n);\n\nQuestion: What is the maximum total wins he had for any year? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_wins\") FROM \"atp_tour_career_earnings\";"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.