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 \"notable_masters\" (\n \"name\" text,\n \"employed\" text,\n \"position_held\" text,\n \"honour\" text,\n \"citation\" text\n);\n\nQuestion: What are the years employed shown for mathematics & prefect master?"
},
{
"role": "assistant",
"content": "SELECT \"employed\" FROM \"notable_masters\" WHERE \"position_held\"='mathematics & prefect master';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_masters\" (\n \"name\" text,\n \"employed\" text,\n \"position_held\" text,\n \"honour\" text,\n \"citation\" text\n);\n\nQuestion: What citation is shown for the employed years of 1970\u20131996?"
},
{
"role": "assistant",
"content": "SELECT \"citation\" FROM \"notable_masters\" WHERE \"employed\"='1970\u20131996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_masters\" (\n \"name\" text,\n \"employed\" text,\n \"position_held\" text,\n \"honour\" text,\n \"citation\" text\n);\n\nQuestion: What is the name of the person employed 1970\u20132005?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"notable_masters\" WHERE \"employed\"='1970\u20132005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Time of the Rowers from Finland with a Rank of less than 4?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"repechage_1\" WHERE \"rank\"<4 AND \"country\"='finland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Rank of the Rowers with a Time of 7:30.92?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"repechage_1\" WHERE \"time\"='7:30.92';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the Notes of the Country of finland?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"repechage_1\" WHERE \"country\"='finland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who were the opponents for week 12?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_s_released\" text,\n \"polling_institute\" text,\n \"nationalist\" text,\n \"labour\" text,\n \"democratic_alternative\" text,\n \"undecided_no_answer\" text,\n \"lead\" text\n);\n\nQuestion: Which polling institute showed a lead of 6%?"
},
{
"role": "assistant",
"content": "SELECT \"polling_institute\" FROM \"opinion_polls\" WHERE \"lead\"='6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_s_released\" text,\n \"polling_institute\" text,\n \"nationalist\" text,\n \"labour\" text,\n \"democratic_alternative\" text,\n \"undecided_no_answer\" text,\n \"lead\" text\n);\n\nQuestion: Which date released had a Democratic Alternative value of 1% and Labour of 34%?"
},
{
"role": "assistant",
"content": "SELECT \"date_s_released\" FROM \"opinion_polls\" WHERE \"democratic_alternative\"='1%' AND \"labour\"='34%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_s_released\" text,\n \"polling_institute\" text,\n \"nationalist\" text,\n \"labour\" text,\n \"democratic_alternative\" text,\n \"undecided_no_answer\" text,\n \"lead\" text\n);\n\nQuestion: What is the Nationalist share of the poll for the response in which Undecided/No Answer received 29.2%?"
},
{
"role": "assistant",
"content": "SELECT \"nationalist\" FROM \"opinion_polls\" WHERE \"undecided_no_answer\"='29.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_s_released\" text,\n \"polling_institute\" text,\n \"nationalist\" text,\n \"labour\" text,\n \"democratic_alternative\" text,\n \"undecided_no_answer\" text,\n \"lead\" text\n);\n\nQuestion: What is the value of the Democratic Alternative for the poll released by Malta Today?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_alternative\" FROM \"opinion_polls\" WHERE \"polling_institute\"='malta today';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_s_released\" text,\n \"polling_institute\" text,\n \"nationalist\" text,\n \"labour\" text,\n \"democratic_alternative\" text,\n \"undecided_no_answer\" text,\n \"lead\" text\n);\n\nQuestion: Which polling institute showed a lead of 12% and a Labour share of the poll at 40.2%?"
},
{
"role": "assistant",
"content": "SELECT \"polling_institute\" FROM \"opinion_polls\" WHERE \"lead\"='12%' AND \"labour\"='40.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest week that has Minnesota Vikings as the opponent?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"opponent\"='minnesota vikings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What opponent has December 6, 1964 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='december 6, 1964';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance of the game on September 18, 1965 before week 3?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"season_schedule\" WHERE \"week\"<3 AND \"date\"='september 18, 1965';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game before week 3 with an attendance of 53,658?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"week\"<3 AND \"attendance\"='53,658';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the earliest week on September 26, 1965?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"season_schedule\" WHERE \"date\"='september 26, 1965';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real,\n \"address\" text\n);\n\nQuestion: What is the total time for one south broad?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"tallest_buildings\" WHERE \"name\"='one south broad';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real,\n \"address\" text\n);\n\nQuestion: What is the 123 south broad street address name before 1973?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"tallest_buildings\" WHERE \"year\"<1973 AND \"address\"='123 south broad street';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition has goals less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"goal\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What's the result of a goal larger than 4?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: tell me the type that has the marostica to bibione course."
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"stage_results\" WHERE \"course\"='marostica to bibione';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: who won on 29 may?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"date\"='29 may';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"territorial_house\" (\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"division\" text,\n \"term\" text,\n \"legislatures\" text\n);\n\nQuestion: What is the term for hometown Ester Creek?"
},
{
"role": "assistant",
"content": "SELECT \"term\" FROM \"territorial_house\" WHERE \"hometown\"='ester creek';"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of Gold medals for the Nation with a Total of 5 and Rank larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"total\"=5 AND \"rank\">1;"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of Silver for the Nation with more than 1 Bronze and a Rank less than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"rank\"<5;"
}
]
|
[
{
"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: In what round was the loss at ufc 118?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"event\"='ufc 118';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tauranga_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: What is the smallest decile with an Area of otumoetai?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"decile\") FROM \"tauranga_city\" WHERE \"area\"='otumoetai';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tauranga_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which decile has an Area of welcome bay, and an Authority of state?"
},
{
"role": "assistant",
"content": "SELECT \"decile\" FROM \"tauranga_city\" WHERE \"area\"='welcome bay' AND \"authority\"='state';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tauranga_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: How many deciles have a Gender of coed, an Authority of state, and a Name of mount maunganui school?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"decile\") FROM \"tauranga_city\" WHERE \"gender\"='coed' AND \"authority\"='state' AND \"name\"='mount maunganui school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tauranga_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which name has a Decile of 5, and an Area of tauranga?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"tauranga_city\" WHERE \"decile\"=5 AND \"area\"='tauranga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tauranga_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: Which Authority has a Gender of coed, a Decile smaller than 6, and an Area of merivale?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"tauranga_city\" WHERE \"gender\"='coed' AND \"decile\"<6 AND \"area\"='merivale';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tauranga_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real\n);\n\nQuestion: What is the smallest decile with a Name of st mary's catholic school?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"decile\") FROM \"tauranga_city\" WHERE \"name\"='st mary''s catholic school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population_movement_of_jews_from_former_\" (\n \"year\" text,\n \"births_000s\" real,\n \"deaths\" real,\n \"natural_growth\" real,\n \"total_fertility_rate\" text\n);\n\nQuestion: What is the average birth rate that has a total fertility rate of na, and a natural growth smaller than 2.5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"births_000s\") FROM \"population_movement_of_jews_from_former_\" WHERE \"total_fertility_rate\"='na' AND \"natural_growth\"<2.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population_movement_of_jews_from_former_\" (\n \"year\" text,\n \"births_000s\" real,\n \"deaths\" real,\n \"natural_growth\" real,\n \"total_fertility_rate\" text\n);\n\nQuestion: What was the amount of deaths that had a natural growth smaller than 3.4, and a total fertility rate of 1.63?"
},
{
"role": "assistant",
"content": "SELECT \"deaths\" FROM \"population_movement_of_jews_from_former_\" WHERE \"natural_growth\"<3.4 AND \"total_fertility_rate\"='1.63';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population_movement_of_jews_from_former_\" (\n \"year\" text,\n \"births_000s\" real,\n \"deaths\" real,\n \"natural_growth\" real,\n \"total_fertility_rate\" text\n);\n\nQuestion: What is the average births that had a death rate of 0.4"
},
{
"role": "assistant",
"content": "SELECT AVG(\"births_000s\") FROM \"population_movement_of_jews_from_former_\" WHERE \"deaths\"=0.4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population_movement_of_jews_from_former_\" (\n \"year\" text,\n \"births_000s\" real,\n \"deaths\" real,\n \"natural_growth\" real,\n \"total_fertility_rate\" text\n);\n\nQuestion: What was the amount of Births (000s) that had a death rate larger than 7.6, and a Year of 1990-2009?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"births_000s\") FROM \"population_movement_of_jews_from_former_\" WHERE \"deaths\">7.6 AND \"year\"='1990-2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population_movement_of_jews_from_former_\" (\n \"year\" text,\n \"births_000s\" real,\n \"deaths\" real,\n \"natural_growth\" real,\n \"total_fertility_rate\" text\n);\n\nQuestion: What was the total fertility rate that had a death rate larger than 7.8?"
},
{
"role": "assistant",
"content": "SELECT \"total_fertility_rate\" FROM \"population_movement_of_jews_from_former_\" WHERE \"deaths\">7.8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"28_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: How many votes did the security guard get?"
},
{
"role": "assistant",
"content": "SELECT \"votes\" FROM \"28_seats\" WHERE \"occupation\"='security guard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"28_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What is John Marvin Wierenga's occupation?"
},
{
"role": "assistant",
"content": "SELECT \"occupation\" FROM \"28_seats\" WHERE \"candidate_s_name\"='john marvin wierenga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"investment\" (\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"total\" real,\n \"average_annual\" real\n);\n\nQuestion: What is the average value for 2005, when the value for 2008 is greater than 0, when the value for 2007 is greater than 310, when the Average annual is 767, and when the Total is greater than 4,597?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2005\") FROM \"investment\" WHERE \"2008\">0 AND \"2007\">310 AND \"average_annual\"=767 AND \"total\">'4,597';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"investment\" (\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"total\" real,\n \"average_annual\" real\n);\n\nQuestion: What is the average value for 2005, when the value for Average annual is 767?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2005\") FROM \"investment\" WHERE \"average_annual\"=767;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" text,\n \"finish\" text,\n \"team\" text,\n \"tournament\" text,\n \"role\" text\n);\n\nQuestion: In what Year was 1st Division El Salvador with a Finish of Champion and a Team of Fas?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"tournament\"='1st division el salvador' AND \"finish\"='champion' AND \"team\"='fas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" text,\n \"finish\" text,\n \"team\" text,\n \"tournament\" text,\n \"role\" text\n);\n\nQuestion: In what Year was the Finish Champions?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"finish\"='champions';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" text,\n \"finish\" text,\n \"team\" text,\n \"tournament\" text,\n \"role\" text\n);\n\nQuestion: During the Tournament of 1st Division El Salvador, what was the Finish for the Team of Platense Municipal Zacatecoluca?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"achievements\" WHERE \"team\"='platense municipal zacatecoluca' AND \"tournament\"='1st division el salvador';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" text,\n \"finish\" text,\n \"team\" text,\n \"tournament\" text,\n \"role\" text\n);\n\nQuestion: What is the Role in the 1st Division Honduras Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"achievements\" WHERE \"tournament\"='1st division honduras';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" text,\n \"finish\" text,\n \"team\" text,\n \"tournament\" text,\n \"role\" text\n);\n\nQuestion: What is the Tournament in the Year of 1986?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"year\"='1986';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" text,\n \"finish\" text,\n \"team\" text,\n \"tournament\" text,\n \"role\" text\n);\n\nQuestion: During the Tournament of Torneo Fraternidad/UNCAF Club championship, what is the Role of the Platense Municipal Zacatecoluca Team?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"achievements\" WHERE \"team\"='platense municipal zacatecoluca' AND \"tournament\"='torneo fraternidad/uncaf club championship';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of teams that play the yankees, and lose at mulholland (5-6)"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='yankees' AND \"loss\"='mulholland (5-6)';"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which total is highest with 0 gold and more than 0 silver, in Ukraine?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"gold\"=0 AND \"silver\">0 AND \"nation\"='ukraine';"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total rank with more than 2 silver and total larger than 10?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"medal_table\" WHERE \"silver\"=2 AND \"total\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total rank with a total larger than 2, and less than 0 gold"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"medal_table\" WHERE \"total\">2 AND \"gold\"<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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which is the highest bronze with gold less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total with a rank less than 5, gold larger than 5 and bronze larger than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"rank\"<5 AND \"gold\">5 AND \"bronze\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: Result of 1st, and an Extra of 4 x 400 m relay is in what lowest year?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"result\"='1st' AND \"extra\"='4 x 400 m relay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: a Year smaller than 2007, and a Result of 1st is in what venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"<2007 AND \"result\"='1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: Venue of melbourne , australia, and a Extra of 200 m has what results?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"achievements\" WHERE \"venue\"='melbourne , australia' AND \"extra\"='200 m';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: Result of 1st, and a Venue of melbourne , australia, and a Extra of 100 m happened in which year?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"result\"='1st' AND \"venue\"='melbourne , australia' AND \"extra\"='100 m';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variations_on_the_theme\" (\n \"num_tubes\" text,\n \"converter\" text,\n \"det_pre_amp\" text,\n \"audio_amp\" text,\n \"rectifier\" text\n);\n\nQuestion: Name the rectifier for Det/Pre-amp of x and # tubes of 4"
},
{
"role": "assistant",
"content": "SELECT \"rectifier\" FROM \"variations_on_the_theme\" WHERE \"det_pre_amp\"='x' AND \"num_tubes\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variations_on_the_theme\" (\n \"num_tubes\" text,\n \"converter\" text,\n \"det_pre_amp\" text,\n \"audio_amp\" text,\n \"rectifier\" text\n);\n\nQuestion: Name the # tubes with Det/Pre-amp of x and audio amp of x x (push-pull)"
},
{
"role": "assistant",
"content": "SELECT \"num_tubes\" FROM \"variations_on_the_theme\" WHERE \"det_pre_amp\"='x' AND \"audio_amp\"='x x (push-pull)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variations_on_the_theme\" (\n \"num_tubes\" text,\n \"converter\" text,\n \"det_pre_amp\" text,\n \"audio_amp\" text,\n \"rectifier\" text\n);\n\nQuestion: Name the det/pre-amp with # of tubes of 8"
},
{
"role": "assistant",
"content": "SELECT \"det_pre_amp\" FROM \"variations_on_the_theme\" WHERE \"num_tubes\"='8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variations_on_the_theme\" (\n \"num_tubes\" text,\n \"converter\" text,\n \"det_pre_amp\" text,\n \"audio_amp\" text,\n \"rectifier\" text\n);\n\nQuestion: Name the det/pre-amp with # tubes of 4 and rectifier of x"
},
{
"role": "assistant",
"content": "SELECT \"det_pre_amp\" FROM \"variations_on_the_theme\" WHERE \"num_tubes\"='4' AND \"rectifier\"='x';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variations_on_the_theme\" (\n \"num_tubes\" text,\n \"converter\" text,\n \"det_pre_amp\" text,\n \"audio_amp\" text,\n \"rectifier\" text\n);\n\nQuestion: Name the # tubes with audio amp of x"
},
{
"role": "assistant",
"content": "SELECT \"num_tubes\" FROM \"variations_on_the_theme\" WHERE \"audio_amp\"='x';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What type of Competition has a Goal of 3?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"goal\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Competition has the Date July 1, 2000?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='july 1, 2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: Which years did James Robert Jones serve?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"external_links\" WHERE \"representative\"='james robert jones';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: James Hutchins Johnson, from New Hampshire, served during what years?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"external_links\" WHERE \"state\"='new hampshire' AND \"representative\"='james hutchins johnson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: Who is the team that has played more than 18 games and has 6 losses?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"all_time_record\" WHERE \"losses\"=6 AND \"games\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: Which season did the Burnaby Lakers have less than 16 points and less than 18 losses?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"all_time_record\" WHERE \"points\"<16 AND \"losses\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: Which team had more than 15 losses in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"all_time_record\" WHERE \"losses\">15 AND \"season\"='1988';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_record\" (\n \"season\" text,\n \"team_name\" text,\n \"games\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: How many losses did the Burnaby Lakers accumulate when they scored 8 points in 1998 playing less than 25 games?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"all_time_record\" WHERE \"team_name\"='burnaby lakers' AND \"points\"=8 AND \"season\"='1998' AND \"games\"<25;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What was the school for the player who was a DL?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"cfl_draft\" WHERE \"position\"='dl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which pick was used on Ian Hazlett?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"cfl_draft\" WHERE \"player\"='ian hazlett';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"available_keypads\" (\n \"supplier\" text,\n \"basic_shape\" text,\n \"keys_x_modes\" text,\n \"wrist_pad\" text,\n \"thumb_stick\" text,\n \"backlit\" text\n);\n\nQuestion: Which Thumb stick has a Basic shape of curved, a Backlit of yes, and a Supplier of genius?"
},
{
"role": "assistant",
"content": "SELECT \"thumb_stick\" FROM \"available_keypads\" WHERE \"basic_shape\"='curved' AND \"backlit\"='yes' AND \"supplier\"='genius';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"available_keypads\" (\n \"supplier\" text,\n \"basic_shape\" text,\n \"keys_x_modes\" text,\n \"wrist_pad\" text,\n \"thumb_stick\" text,\n \"backlit\" text\n);\n\nQuestion: Which Thumb stick has a Wrist pad of no, and a Supplier of sharkoon?"
},
{
"role": "assistant",
"content": "SELECT \"thumb_stick\" FROM \"available_keypads\" WHERE \"wrist_pad\"='no' AND \"supplier\"='sharkoon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"available_keypads\" (\n \"supplier\" text,\n \"basic_shape\" text,\n \"keys_x_modes\" text,\n \"wrist_pad\" text,\n \"thumb_stick\" text,\n \"backlit\" text\n);\n\nQuestion: Which keys (x modes) have a Supplier of wolfking?"
},
{
"role": "assistant",
"content": "SELECT \"keys_x_modes\" FROM \"available_keypads\" WHERE \"supplier\"='wolfking';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"available_keypads\" (\n \"supplier\" text,\n \"basic_shape\" text,\n \"keys_x_modes\" text,\n \"wrist_pad\" text,\n \"thumb_stick\" text,\n \"backlit\" text\n);\n\nQuestion: Which Supplier have a Basic shape of flat, a Wrist pad of no, and Keys (x modes) of 25+?"
},
{
"role": "assistant",
"content": "SELECT \"supplier\" FROM \"available_keypads\" WHERE \"basic_shape\"='flat' AND \"wrist_pad\"='no' AND \"keys_x_modes\"='25+';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent with the time 3:59?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"time\"='3:59';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ifl_champions\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"israel_bowl\" text,\n \"venue\" text,\n \"date\" text,\n \"finals_mvp\" text\n);\n\nQuestion: Name the Israel Bowl for march 30, 2012"
},
{
"role": "assistant",
"content": "SELECT \"israel_bowl\" FROM \"ifl_champions\" WHERE \"date\"='march 30, 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ifl_champions\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"israel_bowl\" text,\n \"venue\" text,\n \"date\" text,\n \"finals_mvp\" text\n);\n\nQuestion: Name the venue for march 28, 2008"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"ifl_champions\" WHERE \"date\"='march 28, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ifl_champions\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"israel_bowl\" text,\n \"venue\" text,\n \"date\" text,\n \"finals_mvp\" text\n);\n\nQuestion: Name the champion for israel bowl of iv"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"ifl_champions\" WHERE \"israel_bowl\"='iv';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ifl_champions\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"israel_bowl\" text,\n \"venue\" text,\n \"date\" text,\n \"finals_mvp\" text\n);\n\nQuestion: Name the season for runner up of judean rebels"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"ifl_champions\" WHERE \"runner_up\"='judean rebels';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_town_tramway_systems_in_the_neth\" (\n \"name_of_system\" text,\n \"location\" text,\n \"traction_type\" text,\n \"date_from\" text,\n \"date_to\" text\n);\n\nQuestion: On what date did the event begin that had a steam traction type and used the system named HSM (1883\u20131910) GT (1915\u20131922)?"
},
{
"role": "assistant",
"content": "SELECT \"date_from\" FROM \"list_of_town_tramway_systems_in_the_neth\" WHERE \"name_of_system\"='hsm (1883\u20131910) gt (1915\u20131922)' AND \"traction_type\"='steam';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_town_tramway_systems_in_the_neth\" (\n \"name_of_system\" text,\n \"location\" text,\n \"traction_type\" text,\n \"date_from\" text,\n \"date_to\" text\n);\n\nQuestion: On what date did the event at Zaltbommel begin?"
},
{
"role": "assistant",
"content": "SELECT \"date_from\" FROM \"list_of_town_tramway_systems_in_the_neth\" WHERE \"location\"='zaltbommel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_town_tramway_systems_in_the_neth\" (\n \"name_of_system\" text,\n \"location\" text,\n \"traction_type\" text,\n \"date_from\" text,\n \"date_to\" text\n);\n\nQuestion: At what location did the event that used electric traction and system name ATM (1880\u20131911) GETA (1911\u20131944) occur?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"list_of_town_tramway_systems_in_the_neth\" WHERE \"name_of_system\"='atm (1880\u20131911) geta (1911\u20131944)' AND \"traction_type\"='electric';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par of the player from England with a t1 place?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"country\"='england' AND \"place\"='t1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the country sergio garc\u00eda, who has a score of 69-70-67=206, is from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='69-70-67=206' AND \"player\"='sergio garc\u00eda';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par of the player from the United States with a t5 place?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"country\"='united states' AND \"place\"='t5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par of the player from the United States with a score of 69-68-65=202?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"country\"='united states' AND \"score\"='69-68-65=202';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: How many lanes had a rank smaller than 4 and a time of 2:01.51?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"semifinal_2\" WHERE \"time\"='2:01.51' AND \"rank\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What was the time of the person in lane 7?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_2\" WHERE \"lane\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_employers\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"employees\" real,\n \"reference_date\" real\n);\n\nQuestion: How many employees at nokia, ranked under 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"employees\") FROM \"largest_employers\" WHERE \"company\"='nokia' AND \"rank\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"incoming_transfers\" (\n \"rank\" real,\n \"year\" real,\n \"name\" text,\n \"moving_from\" text,\n \"moving_to\" text\n);\n\nQuestion: The person with a rank of 8 moving to Shakhtar Donetsk was moving from what Ukrainian Football Club as a transfer?"
},
{
"role": "assistant",
"content": "SELECT \"moving_from\" FROM \"incoming_transfers\" WHERE \"moving_to\"='shakhtar donetsk' AND \"rank\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"incoming_transfers\" (\n \"rank\" real,\n \"year\" real,\n \"name\" text,\n \"moving_from\" text,\n \"moving_to\" text\n);\n\nQuestion: Isma\u00ebl Bangoura with a rank larger than 5 after the year 2005 was moving to what football club?"
},
{
"role": "assistant",
"content": "SELECT \"moving_to\" FROM \"incoming_transfers\" WHERE \"year\">2005 AND \"rank\">5 AND \"name\"='isma\u00ebl bangoura';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"incoming_transfers\" (\n \"rank\" real,\n \"year\" real,\n \"name\" text,\n \"moving_from\" text,\n \"moving_to\" text\n);\n\nQuestion: The player with a rank of 9, made a move from what football club?"
},
{
"role": "assistant",
"content": "SELECT \"moving_from\" FROM \"incoming_transfers\" WHERE \"rank\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"incoming_transfers\" (\n \"rank\" real,\n \"year\" real,\n \"name\" text,\n \"moving_from\" text,\n \"moving_to\" text\n);\n\nQuestion: Moving from Nancy after 2005, what is listed as the lowest rank?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"incoming_transfers\" WHERE \"year\">2005 AND \"moving_from\"='nancy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"incoming_transfers\" (\n \"rank\" real,\n \"year\" real,\n \"name\" text,\n \"moving_from\" text,\n \"moving_to\" text\n);\n\nQuestion: What is the listed year that has a rank smaller than 8 and moving from Olympiacos?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"incoming_transfers\" WHERE \"rank\"<8 AND \"moving_from\"='olympiacos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" real\n);\n\nQuestion: Which team plays in Goa, Salcette?"
},
{
"role": "assistant",
"content": "SELECT \"home_venue\" FROM \"clubs_stadiums_and_locations\" WHERE \"state\"='goa' AND \"city\"='salcette';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" real\n);\n\nQuestion: Where is the home venue of Bengaluru FC?"
},
{
"role": "assistant",
"content": "SELECT \"home_venue\" FROM \"clubs_stadiums_and_locations\" WHERE \"team\"='bengaluru fc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" real\n);\n\nQuestion: What is the state of the team who plays in Mumbai?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"clubs_stadiums_and_locations\" WHERE \"team\"='mumbai';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.