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 \"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 high assists @ Dallas?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"team\"='@ Dallas';"
}
]
|
[
{
"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 high assists when the location attendance was Toyota Center 18,370?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"location_attendance\"='Toyota Center 18,370';"
}
]
|
[
{
"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 record when the high rebounds was from Nick Collison (11)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"high_rebounds\"='Nick Collison (11)';"
}
]
|
[
{
"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: How many times was the final score l 96\u2013123 (ot)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"record\") FROM \"game_log\" WHERE \"score\"='L 96\u2013123 (OT)';"
}
]
|
[
{
"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: How many times was the high assists earl watson (5) and the date of the game was december 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"game_log\" WHERE \"high_assists\"='Earl Watson (5)' AND \"date\"='December 2';"
}
]
|
[
{
"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: Whom did they play on game number 25?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=25;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the number of the leading scorer for keyarena 16,640?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"leading_scorer\") FROM \"february\" WHERE \"attendance\"='KeyArena 16,640';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the number of leading scorer of february 21?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"leading_scorer\") FROM \"february\" WHERE \"date\"='February 21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the leading scorer on february 1?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"february\" WHERE \"date\"='February 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: what's the\u00a0score\u00a0where\u00a0record\u00a0is 35\u201333"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"record\"='35\u201333';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: what's the\u00a0home\u00a0where\u00a0date\u00a0is march 27"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"march\" WHERE \"date\"='March 27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: what's the\u00a0date\u00a0where\u00a0visitor\u00a0is phoenix suns and\u00a0record\u00a0is 31\u201330"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"march\" WHERE \"visitor\"='Phoenix Suns' AND \"record\"='31\u201330';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: what's the\u00a0home team\u00a0where\u00a0score\u00a0is l 80\u201388"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"march\" WHERE \"score\"='L 80\u201388';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: what's the\u00a0leading scorer on march 2"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"march\" WHERE \"date\"='March 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: what's the\u00a0leading scorer where home is sacramento kings"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"march\" WHERE \"home\"='Sacramento Kings';"
}
]
|
[
{
"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's the\u00a0team\u00a0where\u00a0date\u00a0is february 8"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"date\"='February 8';"
}
]
|
[
{
"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's the\u00a0location attendance\u00a0where\u00a0high rebounds\u00a0is nick collison (14)"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"high_rebounds\"='Nick Collison (14)';"
}
]
|
[
{
"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's the\u00a0record\u00a0where\u00a0score\u00a0is w 105\u201392 (ot)"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='W 105\u201392 (OT)';"
}
]
|
[
{
"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's the\u00a0location attendance\u00a0where\u00a0record\u00a0is 14\u201339"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"record\"='14\u201339';"
}
]
|
[
{
"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 is the maximum\u00a0game\u00a0where\u00a0high points\u00a0is micka\u00ebl gelabale (21)"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"high_points\"='Micka\u00ebl Gelabale (21)';"
}
]
|
[
{
"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's the\u00a0record\u00a0where\u00a0location attendance\u00a0is keyarena 13,627"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"location_attendance\"='KeyArena 13,627';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What is the score for april 29?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"date\"='April 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: Name the minimum game"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"playoffs\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: Name the high points for toyota center 18,269?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"location_attendance\"='Toyota Center 18,269';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: what's the\u00a0preliminaries\u00a0with\u00a0average\u00a0being 9.135"
},
{
"role": "assistant",
"content": "SELECT \"preliminaries\" FROM \"scores\" WHERE \"average\"='9.135';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: what's the\u00a0evening gown\u00a0with\u00a0preliminaries\u00a0being 9.212"
},
{
"role": "assistant",
"content": "SELECT \"evening_gown\" FROM \"scores\" WHERE \"preliminaries\"='9.212';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: what's the\u00a0interview\u00a0with\u00a0swimsuit\u00a0being 9.140"
},
{
"role": "assistant",
"content": "SELECT \"interview\" FROM \"scores\" WHERE \"swimsuit\"='9.140';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: what's the\u00a0evening gown\u00a0with\u00a0swimsuit\u00a0being 9.134"
},
{
"role": "assistant",
"content": "SELECT \"evening_gown\" FROM \"scores\" WHERE \"swimsuit\"='9.134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: what's the\u00a0preliminaries\u00a0with\u00a0average\u00a0being 9.360"
},
{
"role": "assistant",
"content": "SELECT \"preliminaries\" FROM \"scores\" WHERE \"average\"='9.360';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1199219_2\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: How many successors were seated in the New York 20th district?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"successor\") FROM \"table1_1199219_2\" WHERE \"district\"='New York 20th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What playoff result happened during the season in which they finished 1st, southern?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"reg_season\"='1st, Southern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: How many teams placed 4th in the regular season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"division\") FROM \"year_by_year\" WHERE \"reg_season\"='4th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What was the result of the open cup when they finished 4th in the regular season?"
},
{
"role": "assistant",
"content": "SELECT \"open_cup\" FROM \"year_by_year\" WHERE \"reg_season\"='4th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: How many open cups were hosted in 1993?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"open_cup\") FROM \"year_by_year\" WHERE \"year\"=1993;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What year did they finish 1st, southern?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"year_by_year\" WHERE \"reg_season\"='1st, Southern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What was the playoff result for theteam in the apsl in 1992?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"league\"='APSL' AND \"year\"=1992;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_score\" (\n \"finish\" real,\n \"start\" real,\n \"car_no\" real,\n \"driver\" text,\n \"car_name\" text,\n \"car_make\" text,\n \"entrant\" text,\n \"laps\" real,\n \"status\" text\n);\n\nQuestion: What was the status of tropartic?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"box_score\" WHERE \"car_name\"='TropArtic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_score\" (\n \"finish\" real,\n \"start\" real,\n \"car_no\" real,\n \"driver\" text,\n \"car_name\" text,\n \"car_make\" text,\n \"entrant\" text,\n \"laps\" real,\n \"status\" text\n);\n\nQuestion: What is the status of joe gibbs racing?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"box_score\" WHERE \"entrant\"='Joe Gibbs Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_score\" (\n \"finish\" real,\n \"start\" real,\n \"car_no\" real,\n \"driver\" text,\n \"car_name\" text,\n \"car_make\" text,\n \"entrant\" text,\n \"laps\" real,\n \"status\" text\n);\n\nQuestion: What is the laops of marcis auto racing?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"box_score\" WHERE \"entrant\"='Marcis Auto Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"index_year\" text,\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_l_a_2\" text\n);\n\nQuestion: what's the\u00a0author / editor / source\u00a0with\u00a0index (year)\u00a0being press freedom (2007)"
},
{
"role": "assistant",
"content": "SELECT \"author_editor_source\" FROM \"table\" WHERE \"index_year\"='Press Freedom (2007)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"index_year\" text,\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_l_a_2\" text\n);\n\nQuestion: how many\u00a0countries sampled\u00a0with\u00a0year of publication\u00a0being 2007 and\u00a0ranking l.a. (2)\u00a0being 7th"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"countries_sampled\") FROM \"table\" WHERE \"year_of_publication\"='2007' AND \"ranking_l_a_2\"='7th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"index_year\" text,\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_l_a_2\" text\n);\n\nQuestion: what's the\u00a0author / editor / source\u00a0with\u00a0world ranking (1)\u00a0being 73rd"
},
{
"role": "assistant",
"content": "SELECT \"author_editor_source\" FROM \"table\" WHERE \"world_ranking_1\"='73rd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"cup_final_attendance\" real\n);\n\nQuestion: How many losingteams were for the cup finaldate 20 August 1989?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losing_team\") FROM \"nsl_cup_winners\" WHERE \"cup_final_date\"='20 August 1989';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"cup_final_attendance\" real\n);\n\nQuestion: How many seasons was the losing team Adelaide City?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"nsl_cup_winners\" WHERE \"losing_team\"='Adelaide City';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nsl_cup_winners\" (\n \"season\" text,\n \"cup_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"cup_final_attendance\" real\n);\n\nQuestion: Who was the winning team in the 1989 season?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"nsl_cup_winners\" WHERE \"season\"='1989';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12027364_1\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the womens doubles when wu jianqui won the womens singles?"
},
{
"role": "assistant",
"content": "SELECT \"womens_doubles\" FROM \"table1_12027364_1\" WHERE \"womens_singles\"='Wu Jianqui';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12027364_1\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the mixed doubles when ji xinpeng won the mens singles?"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"table1_12027364_1\" WHERE \"mens_singles\"='Ji Xinpeng';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12027364_1\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: How many womens singles winners were there when peter rasmussen won the mens singles?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"womens_singles\") FROM \"table1_12027364_1\" WHERE \"mens_singles\"='Peter Rasmussen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: WHO WROTE THE STORY WITH THE PRODUCTION CODE OF 1ADK-03"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_12033013_1\" WHERE \"production_code\"='1ADK-03';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: WHAT IS \"DAVE MOVES OUT\" PRODUCTION CODE?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_12033013_1\" WHERE \"title\"='\\\"Dave Moves Out\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: WHO WROTE \"DAD'S DEAD\""
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_12033013_1\" WHERE \"title\"='\\\"Dad''s Dead\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: WHO AUTHORED \"RED ASPHALT\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_12033013_1\" WHERE \"title\"='\\\"Red Asphalt\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12030612_9\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Name the number of titles written by adam i. lapidus"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_12030612_9\" WHERE \"written_by\"='Adam I. Lapidus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_3\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the season number of the episode titled \"Houseboat\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_season\" FROM \"table1_12033013_3\" WHERE \"title\"='\\\"Houseboat\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_3\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the season number of the episode titled \"Grad school\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_season\" FROM \"table1_12033013_3\" WHERE \"title\"='\\\"Grad School\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12033013_3\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Who directed the episode with a production code 3ADK-03?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_12033013_3\" WHERE \"production_code\"='3ADK-03';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"hakka\" text,\n \"area\" real,\n \"population\" real,\n \"density\" real\n);\n\nQuestion: When pinyin is x\u012bnlu\u00f3 q\u016b, what is the simplified value?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"simplified\") FROM \"administration\" WHERE \"pinyin\"='X\u012bnlu\u00f3 Q\u016b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"hakka\" text,\n \"area\" real,\n \"population\" real,\n \"density\" real\n);\n\nQuestion: What is the pinyin for the English name Wuping County?"
},
{
"role": "assistant",
"content": "SELECT \"pinyin\" FROM \"administration\" WHERE \"english_name\"='Wuping County';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"hakka\" text,\n \"area\" real,\n \"population\" real,\n \"density\" real\n);\n\nQuestion: What is the area of the English name Shanghang County?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"administration\" WHERE \"english_name\"='Shanghang County';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"hakka\" text,\n \"area\" real,\n \"population\" real,\n \"density\" real\n);\n\nQuestion: Which pinyin have a population of 374047?"
},
{
"role": "assistant",
"content": "SELECT \"pinyin\" FROM \"administration\" WHERE \"population\"=374047;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview_by_city\" (\n \"metropolitan_area\" text,\n \"media_market_ranking\" real,\n \"hosted_4_teams_since\" real,\n \"nfl_team_s\" text,\n \"mlb_team_s\" text,\n \"nba_team_s\" text,\n \"nhl_team_s\" text\n);\n\nQuestion: How many NHL teams are there in the Phoenix, Arizona area?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nhl_team_s\") FROM \"overview_by_city\" WHERE \"metropolitan_area\"='Phoenix, Arizona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview_by_city\" (\n \"metropolitan_area\" text,\n \"media_market_ranking\" real,\n \"hosted_4_teams_since\" real,\n \"nfl_team_s\" text,\n \"mlb_team_s\" text,\n \"nba_team_s\" text,\n \"nhl_team_s\" text\n);\n\nQuestion: What is the media market ranking for the Blackhawks?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"media_market_ranking\") FROM \"overview_by_city\" WHERE \"nhl_team_s\"='Blackhawks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview_by_city\" (\n \"metropolitan_area\" text,\n \"media_market_ranking\" real,\n \"hosted_4_teams_since\" real,\n \"nfl_team_s\" text,\n \"mlb_team_s\" text,\n \"nba_team_s\" text,\n \"nhl_team_s\" text\n);\n\nQuestion: What is the the name of the NHL team that is in the same market as the NBA team, Nuggets?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team_s\" FROM \"overview_by_city\" WHERE \"nba_team_s\"='Nuggets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview_by_city\" (\n \"metropolitan_area\" text,\n \"media_market_ranking\" real,\n \"hosted_4_teams_since\" real,\n \"nfl_team_s\" text,\n \"mlb_team_s\" text,\n \"nba_team_s\" text,\n \"nhl_team_s\" text\n);\n\nQuestion: What is the NHL team in the media market ranking number 7?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team_s\" FROM \"overview_by_city\" WHERE \"media_market_ranking\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1206114_2\" (\n \"vendor_and_type\" text,\n \"models\" text,\n \"net_flow_version\" text,\n \"implementation\" text,\n \"comments\" text\n);\n\nQuestion: How many netflow version are there when the vendor and type is enterasys switches?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"net_flow_version\") FROM \"table1_1206114_2\" WHERE \"vendor_and_type\"='Enterasys Switches';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1206114_2\" (\n \"vendor_and_type\" text,\n \"models\" text,\n \"net_flow_version\" text,\n \"implementation\" text,\n \"comments\" text\n);\n\nQuestion: What are the comments when the vendor and type is alcatel-lucent routers?"
},
{
"role": "assistant",
"content": "SELECT \"comments\" FROM \"table1_1206114_2\" WHERE \"vendor_and_type\"='Alcatel-Lucent routers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1206114_2\" (\n \"vendor_and_type\" text,\n \"models\" text,\n \"net_flow_version\" text,\n \"implementation\" text,\n \"comments\" text\n);\n\nQuestion: What are the comments when vendor and type is enterasys switches?"
},
{
"role": "assistant",
"content": "SELECT \"comments\" FROM \"table1_1206114_2\" WHERE \"vendor_and_type\"='Enterasys Switches';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1206114_2\" (\n \"vendor_and_type\" text,\n \"models\" text,\n \"net_flow_version\" text,\n \"implementation\" text,\n \"comments\" text\n);\n\nQuestion: What is the netflow version when vendor and type is pc and servers?"
},
{
"role": "assistant",
"content": "SELECT \"net_flow_version\" FROM \"table1_1206114_2\" WHERE \"vendor_and_type\"='PC and Servers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1206114_2\" (\n \"vendor_and_type\" text,\n \"models\" text,\n \"net_flow_version\" text,\n \"implementation\" text,\n \"comments\" text\n);\n\nQuestion: What are the comments when the implementation is software running on central processor module?"
},
{
"role": "assistant",
"content": "SELECT \"comments\" FROM \"table1_1206114_2\" WHERE \"implementation\"='Software running on Central Processor Module';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1206114_2\" (\n \"vendor_and_type\" text,\n \"models\" text,\n \"net_flow_version\" text,\n \"implementation\" text,\n \"comments\" text\n);\n\nQuestion: What is the implementation when the netflow version is v5, v8, v9, ipfix?"
},
{
"role": "assistant",
"content": "SELECT \"implementation\" FROM \"table1_1206114_2\" WHERE \"net_flow_version\"='v5, v8, v9, IPFIX';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" text,\n \"against_prohibition\" real,\n \"percent_against\" text\n);\n\nQuestion: Name the minimum for prohibition?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"for_prohibition\") FROM \"results_of_the_national_referendum_on_pr\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" text,\n \"against_prohibition\" real,\n \"percent_against\" text\n);\n\nQuestion: What is the number of jurisdiction for 57.3 percent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"jurisdiction\") FROM \"results_of_the_national_referendum_on_pr\" WHERE \"percent_for\"='57.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" text,\n \"against_prohibition\" real,\n \"percent_against\" text\n);\n\nQuestion: Name the max for prohibition."
},
{
"role": "assistant",
"content": "SELECT MAX(\"for_prohibition\") FROM \"results_of_the_national_referendum_on_pr\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" text,\n \"against_prohibition\" real,\n \"percent_against\" text\n);\n\nQuestion: What is the percent for when against prohibition is 2978?"
},
{
"role": "assistant",
"content": "SELECT \"percent_for\" FROM \"results_of_the_national_referendum_on_pr\" WHERE \"against_prohibition\"=2978;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" text,\n \"against_prohibition\" real,\n \"percent_against\" text\n);\n\nQuestion: What is the percent for in manitoba?"
},
{
"role": "assistant",
"content": "SELECT \"percent_for\" FROM \"results_of_the_national_referendum_on_pr\" WHERE \"jurisdiction\"='Manitoba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: How many trains leave from puri?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"train_name\") FROM \"train_services\" WHERE \"origin\"='Puri';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: What train number is heading to amritsar?"
},
{
"role": "assistant",
"content": "SELECT \"train_no\" FROM \"train_services\" WHERE \"destination\"='Amritsar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: How often does a train leave sealdah?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"train_services\" WHERE \"origin\"='Sealdah';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: Where does the bg express train end?"
},
{
"role": "assistant",
"content": "SELECT \"destination\" FROM \"train_services\" WHERE \"train_name\"='BG Express';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"train_services\" (\n \"train_no\" text,\n \"train_name\" text,\n \"origin\" text,\n \"destination\" text,\n \"frequency\" text\n);\n\nQuestion: What's the name of train number 15647/48?"
},
{
"role": "assistant",
"content": "SELECT \"train_name\" FROM \"train_services\" WHERE \"train_no\"='15647/48';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_12086015_7\" (\n \"player\" text,\n \"nationality\" text,\n \"finals\" real,\n \"win_loss\" text,\n \"year_s\" text\n);\n\nQuestion: What is the number of nationality in 1992?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nationality\") FROM \"table1_12086015_7\" WHERE \"year_s\"='1992';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"communications_and_corporate_affairs\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: Who is the academic & University affairs when the Human resources & operations is N. Charles Hamilton?"
},
{
"role": "assistant",
"content": "SELECT \"academic_university_affairs\" FROM \"executive_commissioners\" WHERE \"human_resources_operations\"='N. Charles Hamilton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"executive_commissioners\" (\n \"year\" text,\n \"communications_and_corporate_affairs\" text,\n \"human_resources_operations\" text,\n \"local_affairs\" text,\n \"academic_university_affairs\" text,\n \"external_affairs\" text\n);\n\nQuestion: What year was communications and corporate affairs held by Jeff Rotman?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"executive_commissioners\" WHERE \"communications_and_corporate_affairs\"='Jeff Rotman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"building_and_withdrawal_data\" (\n \"number\" real,\n \"builder\" text,\n \"built\" text,\n \"rebuilt\" text,\n \"name_as_rebuilt\" text,\n \"scrapped_sold\" text\n);\n\nQuestion: What was the built data for Knocklayd rebuild?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"building_and_withdrawal_data\" WHERE \"name_as_rebuilt\"='Knocklayd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"building_and_withdrawal_data\" (\n \"number\" real,\n \"builder\" text,\n \"built\" text,\n \"rebuilt\" text,\n \"name_as_rebuilt\" text,\n \"scrapped_sold\" text\n);\n\nQuestion: How many times does the rebuilt data contain cannot handle non-empty timestamp argument! 1929 and scrapped data contain cannot handle non-empty timestamp argument! 1954?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number\") FROM \"building_and_withdrawal_data\" WHERE \"rebuilt\"='Cannot handle non-empty timestamp argument! 1929' AND \"scrapped_sold\"='Cannot handle non-empty timestamp argument! 1954';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"building_and_withdrawal_data\" (\n \"number\" real,\n \"builder\" text,\n \"built\" text,\n \"rebuilt\" text,\n \"name_as_rebuilt\" text,\n \"scrapped_sold\" text\n);\n\nQuestion: What is the built data on the scrapped information that is cannot handle non-empty timestamp argument! 1947?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"building_and_withdrawal_data\" WHERE \"scrapped_sold\"='Cannot handle non-empty timestamp argument! 1947';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"building_and_withdrawal_data\" (\n \"number\" real,\n \"builder\" text,\n \"built\" text,\n \"rebuilt\" text,\n \"name_as_rebuilt\" text,\n \"scrapped_sold\" text\n);\n\nQuestion: How many times was the rebuilt data cannot handle non-empty timestamp argument! 1934?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number\") FROM \"building_and_withdrawal_data\" WHERE \"rebuilt\"='Cannot handle non-empty timestamp argument! 1934';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"building_and_withdrawal_data\" (\n \"number\" real,\n \"builder\" text,\n \"built\" text,\n \"rebuilt\" text,\n \"name_as_rebuilt\" text,\n \"scrapped_sold\" text\n);\n\nQuestion: What is the built data for number 34?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"building_and_withdrawal_data\" WHERE \"number\"=34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"building_and_withdrawal_data\" (\n \"number\" real,\n \"builder\" text,\n \"built\" text,\n \"rebuilt\" text,\n \"name_as_rebuilt\" text,\n \"scrapped_sold\" text\n);\n\nQuestion: What is the highest number listed?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number\") FROM \"building_and_withdrawal_data\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the womens singles when Marc Zwiebler won the men's singles?"
},
{
"role": "assistant",
"content": "SELECT \"womens_singles\" FROM \"21st_century\" WHERE \"mens_singles\"='Marc Zwiebler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: The 1.6 Duratec model/engine has how many torque formulas?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"torque_nm_rpm\") FROM \"engines_and_transmissions\" WHERE \"model_engine\"='1.6 Duratec';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: For the model with torque of n\u00b7m (lb\u00b7ft)/*n\u00b7m (lb\u00b7ft) @1750, what is the power?"
},
{
"role": "assistant",
"content": "SELECT \"power_rpm\" FROM \"engines_and_transmissions\" WHERE \"torque_nm_rpm\"='N\u00b7m (lb\u00b7ft)/*N\u00b7m (lb\u00b7ft) @1750';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: For the model/engine of 1.8 Duratec HE, what is the torque?"
},
{
"role": "assistant",
"content": "SELECT \"torque_nm_rpm\" FROM \"engines_and_transmissions\" WHERE \"model_engine\"='1.8 Duratec HE';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: How many capacities are possible for the 1.6 Duratec model/engine?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"capacity\") FROM \"engines_and_transmissions\" WHERE \"model_engine\"='1.6 Duratec';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: What is the torque formula for the model/engine which has 1,753 cc capacity?"
},
{
"role": "assistant",
"content": "SELECT \"torque_nm_rpm\" FROM \"engines_and_transmissions\" WHERE \"capacity\"='1,753 cc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines_and_transmissions\" (\n \"model_engine\" text,\n \"capacity\" text,\n \"cylinders_valves\" text,\n \"power_rpm\" text,\n \"torque_nm_rpm\" text\n);\n\nQuestion: What is the torque formula for the 1.6 Duratec ti-vct model/engine?"
},
{
"role": "assistant",
"content": "SELECT \"torque_nm_rpm\" FROM \"engines_and_transmissions\" WHERE \"model_engine\"='1.6 Duratec Ti-VCT';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ghanaian_presidents_ages\" (\n \"num\" real,\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: what's the\u00a0date of birth\u00a0with\u00a0end of term\u00a0being 2april1969"
},
{
"role": "assistant",
"content": "SELECT \"date_of_birth\" FROM \"ghanaian_presidents_ages\" WHERE \"end_of_term\"='2April1969';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ghanaian_presidents_ages\" (\n \"num\" real,\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: who is the the\u00a0president\u00a0with\u00a0date of inauguration\u00a0being 4june1979"
},
{
"role": "assistant",
"content": "SELECT \"president\" FROM \"ghanaian_presidents_ages\" WHERE \"date_of_inauguration\"='4June1979';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ghanaian_presidents_ages\" (\n \"num\" real,\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: how many\u00a0president\u00a0with\u00a0date of inauguration\u00a0being 4june1979"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"president\") FROM \"ghanaian_presidents_ages\" WHERE \"date_of_inauguration\"='4June1979';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ghanaian_presidents_ages\" (\n \"num\" real,\n \"president\" text,\n \"date_of_birth\" text,\n \"date_of_inauguration\" text,\n \"age_at_inauguration\" text,\n \"end_of_term\" text,\n \"length_of_retirement\" text,\n \"date_of_death\" text,\n \"lifespan\" text\n);\n\nQuestion: what's the\u00a0date of birth\u00a0with\u00a0end of term\u00a0being 5july1978"
},
{
"role": "assistant",
"content": "SELECT \"date_of_birth\" FROM \"ghanaian_presidents_ages\" WHERE \"end_of_term\"='5July1978';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.