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 \"table1_24837750_1\" (\n \"wind_farm\" text,\n \"installed_capacity_mw\" text,\n \"turbine_manufacturer\" text,\n \"county\" text,\n \"date_in_service\" text\n);\n\nQuestion: Who was the turbine manufacturer for the Wheatland county?"
},
{
"role": "assistant",
"content": "SELECT \"turbine_manufacturer\" FROM \"table1_24837750_1\" WHERE \"county\"='Wheatland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24837750_1\" (\n \"wind_farm\" text,\n \"installed_capacity_mw\" text,\n \"turbine_manufacturer\" text,\n \"county\" text,\n \"date_in_service\" text\n);\n\nQuestion: How many turbine manufacturers installed a capacity of 189 MW?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"turbine_manufacturer\") FROM \"table1_24837750_1\" WHERE \"installed_capacity_mw\"='189';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24837750_1\" (\n \"wind_farm\" text,\n \"installed_capacity_mw\" text,\n \"turbine_manufacturer\" text,\n \"county\" text,\n \"date_in_service\" text\n);\n\nQuestion: How much capacity was installed in Wheatland?"
},
{
"role": "assistant",
"content": "SELECT \"installed_capacity_mw\" FROM \"table1_24837750_1\" WHERE \"county\"='Wheatland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24837750_1\" (\n \"wind_farm\" text,\n \"installed_capacity_mw\" text,\n \"turbine_manufacturer\" text,\n \"county\" text,\n \"date_in_service\" text\n);\n\nQuestion: Who was the turbine manufacturer of the wind farm that started service on 2005?"
},
{
"role": "assistant",
"content": "SELECT \"turbine_manufacturer\" FROM \"table1_24837750_1\" WHERE \"date_in_service\"='2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24837750_1\" (\n \"wind_farm\" text,\n \"installed_capacity_mw\" text,\n \"turbine_manufacturer\" text,\n \"county\" text,\n \"date_in_service\" text\n);\n\nQuestion: When did this wind farm started service with a capacity of 135 MW?"
},
{
"role": "assistant",
"content": "SELECT \"date_in_service\" FROM \"table1_24837750_1\" WHERE \"installed_capacity_mw\"='135';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24837750_1\" (\n \"wind_farm\" text,\n \"installed_capacity_mw\" text,\n \"turbine_manufacturer\" text,\n \"county\" text,\n \"date_in_service\" text\n);\n\nQuestion: When did the wind farm in Musselshell started service?"
},
{
"role": "assistant",
"content": "SELECT \"date_in_service\" FROM \"table1_24837750_1\" WHERE \"county\"='Musselshell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24814477_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the largest attendance at the Rheinstadion?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"table1_24814477_2\" WHERE \"game_site\"='Rheinstadion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24814477_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What week did the Galaxy play the Amsterdam Admirals?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"table1_24814477_2\" WHERE \"opponent\"='Amsterdam Admirals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24814477_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent in Week 8?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"table1_24814477_2\" WHERE \"week\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_winners\" (\n \"round\" text,\n \"circuit\" text,\n \"date\" text,\n \"class_a_winner\" text,\n \"class_b_winner\" text,\n \"class_c_winner\" text,\n \"class_d_winner\" text\n);\n\nQuestion: Who was the Class A winner when the Class C winner was David Haynes?"
},
{
"role": "assistant",
"content": "SELECT \"class_a_winner\" FROM \"calendar_winners\" WHERE \"class_c_winner\"='David Haynes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_winners\" (\n \"round\" text,\n \"circuit\" text,\n \"date\" text,\n \"class_a_winner\" text,\n \"class_b_winner\" text,\n \"class_c_winner\" text,\n \"class_d_winner\" text\n);\n\nQuestion: Who was the Class C winner in round 8?"
},
{
"role": "assistant",
"content": "SELECT \"class_c_winner\" FROM \"calendar_winners\" WHERE \"round\"='8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_winners\" (\n \"round\" text,\n \"circuit\" text,\n \"date\" text,\n \"class_a_winner\" text,\n \"class_b_winner\" text,\n \"class_c_winner\" text,\n \"class_d_winner\" text\n);\n\nQuestion: Who was the Class D winner in round 6?"
},
{
"role": "assistant",
"content": "SELECT \"class_d_winner\" FROM \"calendar_winners\" WHERE \"round\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_winners\" (\n \"round\" text,\n \"circuit\" text,\n \"date\" text,\n \"class_a_winner\" text,\n \"class_b_winner\" text,\n \"class_c_winner\" text,\n \"class_d_winner\" text\n);\n\nQuestion: What was the circuit in round 2?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"calendar_winners\" WHERE \"round\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_winners\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"class_a_winner\" text,\n \"class_b_winner\" text,\n \"class_c_winner\" text,\n \"class_d_winner\" text\n);\n\nQuestion: In which round did Roy Salvadori won Class D and Alan Hutcheson won Class B?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"calendar_winners\" WHERE \"class_d_winner\"='Roy Salvadori' AND \"class_b_winner\"='Alan Hutcheson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_winners\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"class_a_winner\" text,\n \"class_b_winner\" text,\n \"class_c_winner\" text,\n \"class_d_winner\" text\n);\n\nQuestion: When did Alan Hutcheson won Class B on round 1?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"calendar_winners\" WHERE \"class_b_winner\"='Alan Hutcheson' AND \"round\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many field goals did Stacey Thomas have? "
},
{
"role": "assistant",
"content": "SELECT \"field_goals\" FROM \"player_stats\" WHERE \"player\"='Stacey Thomas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many assists did the player who had 121 rebounds have? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"assists\") FROM \"player_stats\" WHERE \"rebounds\"=121;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many field goals did the player who had 8 blocks have? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"field_goals\") FROM \"player_stats\" WHERE \"blocks\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many assists did the player who had 863 minutes have? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"assists\") FROM \"player_stats\" WHERE \"minutes\"=863;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many blocks did the player who had 59 rebounds have? "
},
{
"role": "assistant",
"content": "SELECT \"blocks\" FROM \"player_stats\" WHERE \"rebounds\"=59;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24852001_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Who were the opponents that had an attendance of exactly 16115?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"table1_24852001_2\" WHERE \"attendance\"=16115;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24852001_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the team record after the Frankfurt Galaxy matchup?"
},
{
"role": "assistant",
"content": "SELECT \"team_record\" FROM \"table1_24852001_2\" WHERE \"opponent\"='Frankfurt Galaxy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24852001_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the game site for the matchup against the Frankfurt Galaxy?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"table1_24852001_2\" WHERE \"opponent\"='Frankfurt Galaxy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24865763_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp1_winning_team\" text,\n \"lmp2_winning_team\" text,\n \"flm_winning_team\" text,\n \"gt1_winning_team\" text,\n \"gt2_winning_team\" text,\n \"results\" text\n);\n\nQuestion: How many results did the GT1 Winning Team No. 50 Larbre Comp\u00e9tition on the Algarve circuit?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"results\") FROM \"table1_24865763_2\" WHERE \"circuit\"='Algarve' AND \"gt1_winning_team\"='No. 50 Larbre Comp\u00e9tition';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24865763_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp1_winning_team\" text,\n \"lmp2_winning_team\" text,\n \"flm_winning_team\" text,\n \"gt1_winning_team\" text,\n \"gt2_winning_team\" text,\n \"results\" text\n);\n\nQuestion: How many winning teams are there on LMP2 if Gabriele Gardel Patrice Goueslard Fernando Rees was the GT1 Winning Team on the Algarve circuit?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lmp2_winning_team\") FROM \"table1_24865763_2\" WHERE \"gt1_winning_team\"='Gabriele Gardel Patrice Goueslard Fernando Rees' AND \"circuit\"='Algarve';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24865763_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp1_winning_team\" text,\n \"lmp2_winning_team\" text,\n \"flm_winning_team\" text,\n \"gt1_winning_team\" text,\n \"gt2_winning_team\" text,\n \"results\" text\n);\n\nQuestion: Who was the GT2 Winning Team if Greg Mansell Leo Mansell was the LMP1 Winning Team?"
},
{
"role": "assistant",
"content": "SELECT \"gt2_winning_team\" FROM \"table1_24865763_2\" WHERE \"lmp1_winning_team\"='Greg Mansell Leo Mansell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24865763_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp1_winning_team\" text,\n \"lmp2_winning_team\" text,\n \"flm_winning_team\" text,\n \"gt1_winning_team\" text,\n \"gt2_winning_team\" text,\n \"results\" text\n);\n\nQuestion: What was the maximum round where Marc Lieb Richard Lietz was on the GT2 Winning Team?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rnd\") FROM \"table1_24865763_2\" WHERE \"gt2_winning_team\"='Marc Lieb Richard Lietz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24865763_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp1_winning_team\" text,\n \"lmp2_winning_team\" text,\n \"flm_winning_team\" text,\n \"gt1_winning_team\" text,\n \"gt2_winning_team\" text,\n \"results\" text\n);\n\nQuestion: How many won the LMP1 on round 4 if No. 42 Strakka Racing was the LMP2 Winning Team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lmp1_winning_team\") FROM \"table1_24865763_2\" WHERE \"rnd\"=4 AND \"lmp2_winning_team\"='No. 42 Strakka Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24865763_2\" (\n \"rnd\" real,\n \"circuit\" text,\n \"lmp1_winning_team\" text,\n \"lmp2_winning_team\" text,\n \"flm_winning_team\" text,\n \"gt1_winning_team\" text,\n \"gt2_winning_team\" text,\n \"results\" text\n);\n\nQuestion: In what round did Mike Newton Thomas Erdos Ben Collins won the LMP2?"
},
{
"role": "assistant",
"content": "SELECT \"rnd\" FROM \"table1_24865763_2\" WHERE \"lmp2_winning_team\"='Mike Newton Thomas Erdos Ben Collins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many blocks did tye'sha fluker have?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"blocks\") FROM \"player_stats\" WHERE \"player\"='Tye''sha Fluker';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is the highest number of steals for a player with 324 minutes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"steals\") FROM \"player_stats\" WHERE \"minutes\"=324;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest number of minutes for a player with 47 steals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"minutes\") FROM \"player_stats\" WHERE \"steals\"=47;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championships_of_the_wbf\" (\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 played Mixed Doubles in 1991?"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"world_championships_of_the_wbf\" WHERE \"year\"=1991;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team who played plymouth argyle?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"ties\" WHERE \"away_team\"='Plymouth Argyle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What was the score when the away team was norwich city?"
},
{
"role": "assistant",
"content": "SELECT \"score_1\" FROM \"ties\" WHERE \"away_team\"='Norwich City';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: Who played as the away team when coventry city was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"ties\" WHERE \"home_team\"='Coventry City';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24882796_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the final score when they played Frankfurt Galaxy?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"table1_24882796_2\" WHERE \"opponent\"='Frankfurt Galaxy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team for tie no 11?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"ties\" WHERE \"tie_no\"=11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team for tie no 15?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"ties\" WHERE \"tie_no\"=15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What is the highest tie that had 19129 attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tie_no\") FROM \"ties\" WHERE \"attendance\"=19129;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What is the tie when the home team is Stoke City?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"ties\" WHERE \"home_team\"='Stoke City';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What tie has Orient as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"ties\" WHERE \"home_team\"='Orient';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: How many dates are there for tie number 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"ties\" WHERE \"tie_no\"=12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"riders\" (\n \"position\" real,\n \"driver_passenger\" text,\n \"equipment\" text,\n \"bike_no\" real,\n \"points\" real\n);\n\nQuestion: When 556 is the amount of points how much equipment is there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"equipment\") FROM \"riders\" WHERE \"points\"=556;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_4_2\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which championship was the score 6\u20134, 5\u20137, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"doubles_6_4_2\" WHERE \"score\"='6\u20134, 5\u20137, 6\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_4_2\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were the opponents in the Rome championship?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_6_4_2\" WHERE \"championship\"='Rome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is the maximum number of minutes associated with exactly 70 field goals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"minutes\") FROM \"player_stats\" WHERE \"field_goals\"=70;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is the minimum number of field goals associated with exactly 84 assists?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"field_goals\") FROM \"player_stats\" WHERE \"assists\"=84;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many steals did Tamika Williams have?"
},
{
"role": "assistant",
"content": "SELECT \"steals\" FROM \"player_stats\" WHERE \"player\"='Tamika Williams';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: List the number of takeaways with 1 rejection."
},
{
"role": "assistant",
"content": "SELECT COUNT(\"steals\") FROM \"player_stats\" WHERE \"blocks\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many long range shots did tonya edwards make."
},
{
"role": "assistant",
"content": "SELECT COUNT(\"field_goals\") FROM \"player_stats\" WHERE \"player\"='Tonya Edwards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: List the number of long range shors where the score is 171."
},
{
"role": "assistant",
"content": "SELECT COUNT(\"field_goals\") FROM \"player_stats\" WHERE \"points\"=171;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_party_demo_intro_compo_winners_1991_\" (\n \"year\" text,\n \"amiga_demo\" text,\n \"pc_demo\" text,\n \"c64_demo\" text,\n \"amiga_intro\" text,\n \"pc_intro\" text\n);\n\nQuestion: Who won best amiga demo when tribes ( pulse & melon dezign) won best pc demo?"
},
{
"role": "assistant",
"content": "SELECT \"amiga_demo\" FROM \"the_party_demo_intro_compo_winners_1991_\" WHERE \"pc_demo\"='Tribes ( Pulse & Melon Dezign)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_party_demo_intro_compo_winners_1991_\" (\n \"year\" text,\n \"amiga_demo\" text,\n \"pc_demo\" text,\n \"c64_demo\" text,\n \"amiga_intro\" text,\n \"pc_intro\" text\n);\n\nQuestion: What won best amiga demo when alto knallo (free electric band) won best pc demo?"
},
{
"role": "assistant",
"content": "SELECT \"amiga_demo\" FROM \"the_party_demo_intro_compo_winners_1991_\" WHERE \"pc_demo\"='Alto Knallo (Free Electric Band)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_party_demo_intro_compo_winners_1991_\" (\n \"year\" text,\n \"amiga_demo\" text,\n \"pc_demo\" text,\n \"c64_demo\" text,\n \"amiga_intro\" text,\n \"pc_intro\" text\n);\n\nQuestion: What won best pc intro when my kingdom (haujobb & scoopex) won best amiga demo?"
},
{
"role": "assistant",
"content": "SELECT \"pc_intro\" FROM \"the_party_demo_intro_compo_winners_1991_\" WHERE \"amiga_demo\"='My Kingdom (Haujobb & Scoopex)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_party_demo_intro_compo_winners_1991_\" (\n \"year\" text,\n \"amiga_demo\" text,\n \"pc_demo\" text,\n \"c64_demo\" text,\n \"amiga_intro\" text,\n \"pc_intro\" text\n);\n\nQuestion: What won est pc intro when 4k0 (polka brothers) won best amiga intro?"
},
{
"role": "assistant",
"content": "SELECT \"pc_intro\" FROM \"the_party_demo_intro_compo_winners_1991_\" WHERE \"amiga_intro\"='4k0 (Polka Brothers)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_party_demo_intro_compo_winners_1991_\" (\n \"year\" text,\n \"amiga_demo\" text,\n \"pc_demo\" text,\n \"c64_demo\" text,\n \"amiga_intro\" text,\n \"pc_intro\" text\n);\n\nQuestion: What won best pc demo when tower power (camelot) won best c64 demo?"
},
{
"role": "assistant",
"content": "SELECT \"pc_demo\" FROM \"the_party_demo_intro_compo_winners_1991_\" WHERE \"c64_demo\"='Tower Power (Camelot)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_party_demo_intro_compo_winners_1991_\" (\n \"year\" text,\n \"amiga_demo\" text,\n \"pc_demo\" text,\n \"c64_demo\" text,\n \"amiga_intro\" text,\n \"pc_intro\" text\n);\n\nQuestion: What year did fr-08: the product ( farbrausch ) win best pc intro?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"the_party_demo_intro_compo_winners_1991_\" WHERE \"pc_intro\"='FR-08: The Product ( Farbrausch )';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910737_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the episode title that had a US viewership of 8.16?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_24910737_1\" WHERE \"u_s_viewers_millions\"='8.16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910737_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the number in the series written by Steve Blackman and had a title of \"Worlds Apart\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_series\" FROM \"table1_24910737_1\" WHERE \"written_by\"='Steve Blackman' AND \"title\"='\\\"Worlds Apart\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910737_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the number in the series that was titled \"Past Tense\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_series\" FROM \"table1_24910737_1\" WHERE \"title\"='\\\"Past Tense\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910737_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote the episodes that had a viewership of 7.14?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_24910737_1\" WHERE \"u_s_viewers_millions\"='7.14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" real\n);\n\nQuestion: What is the timeslot for the episode \"In which Addison finds the magic\"?"
},
{
"role": "assistant",
"content": "SELECT \"timeslot_est\" FROM \"u_s\" WHERE \"episode\"='\\\"In Which Addison Finds the Magic\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" real\n);\n\nQuestion: How many episodes received rating of 8.2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode\") FROM \"u_s\" WHERE \"rating\"='8.2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" real\n);\n\nQuestion: What is the rating for the episode \"in which cooper finds a port in his storm\"?"
},
{
"role": "assistant",
"content": "SELECT \"rating\" FROM \"u_s\" WHERE \"episode\"='\\\"In Which Cooper Finds a Port In His Storm\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" real\n);\n\nQuestion: How many share figures are there for the episode that aired on October 17, 2007?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"share\") FROM \"u_s\" WHERE \"air_date\"='October 17, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" real\n);\n\nQuestion: How many episodes aired on October 17, 2007?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode\") FROM \"u_s\" WHERE \"air_date\"='October 17, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" real\n);\n\nQuestion: How many timeslots received a rating of 5.7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"timeslot_est\") FROM \"u_s\" WHERE \"rating\"='5.7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910733_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many writers are listed when the U.S viewers are 11.21 million?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"written_by\") FROM \"table1_24910733_1\" WHERE \"u_s_viewers_millions\"='11.21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910733_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who is the director when there is 8.44 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_24910733_1\" WHERE \"u_s_viewers_millions\"='8.44';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910733_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who is the director when the writter is Andrea Newman?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_24910733_1\" WHERE \"written_by\"='Andrea Newman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910733_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the title when the writer is Emily Halpern?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_24910733_1\" WHERE \"written_by\"='Emily Halpern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910733_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who is the director when there is 11.21 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_24910733_1\" WHERE \"u_s_viewers_millions\"='11.21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24910733_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many titles are listed with 8.44 million viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_24910733_1\" WHERE \"u_s_viewers_millions\"='8.44';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" text\n);\n\nQuestion: On what date does the episode called \"triangles\" air"
},
{
"role": "assistant",
"content": "SELECT \"air_date\" FROM \"u_s\" WHERE \"episode\"='\\\"Triangles\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" text\n);\n\nQuestion: When the episode called \"the parent trap\" airs, what is the weekly rank"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"weekly_rank_num\") FROM \"u_s\" WHERE \"episode\"='\\\"The Parent Trap\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" text\n);\n\nQuestion: What is the share value of the episode \"sins of the father\""
},
{
"role": "assistant",
"content": "SELECT MAX(\"share\") FROM \"u_s\" WHERE \"episode\"='\\\"Sins of the Father\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"weekly_rank_num\" text\n);\n\nQuestion: How many millions of viewers watched the episode \"blowups\""
},
{
"role": "assistant",
"content": "SELECT \"viewers_m\" FROM \"u_s\" WHERE \"episode\"='\\\"Blowups\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many field goals had 597 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"field_goals\") FROM \"player_stats\" WHERE \"points\"=597;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many minutes were played by Sue Bird?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"minutes\") FROM \"player_stats\" WHERE \"player\"='Sue Bird';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is the maximum number of rebounds for players having exactly 35 steals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rebounds\") FROM \"player_stats\" WHERE \"steals\"=35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What are the numbers of steals associated with players having exactly 3 blocks?"
},
{
"role": "assistant",
"content": "SELECT \"steals\" FROM \"player_stats\" WHERE \"blocks\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many numbers of rebounds are associated with exactly 18 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rebounds\") FROM \"player_stats\" WHERE \"points\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is the maximum number of assists for players named Anastasia Kostaki?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"assists\") FROM \"player_stats\" WHERE \"player\"='Anastasia Kostaki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: What is Tiffani Johnson's maximum steals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"steals\") FROM \"player_stats\" WHERE \"player\"='Tiffani Johnson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: Which player has 17 blocks?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"player_stats\" WHERE \"blocks\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many field goals does the player with 84 rebounds have?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"field_goals\") FROM \"player_stats\" WHERE \"rebounds\"=84;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many blocks does the player who played 893 minutes have?"
},
{
"role": "assistant",
"content": "SELECT \"blocks\" FROM \"player_stats\" WHERE \"minutes\"=893;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"minutes\" real,\n \"field_goals\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"points\" real\n);\n\nQuestion: How many points does the player with 2 steals have?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"player_stats\" WHERE \"steals\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_septuple_or_seven_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"defenses\" real\n);\n\nQuestion: Name the most number"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number\") FROM \"list_of_boxing_septuple_or_seven_divisio\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_septuple_or_seven_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"defenses\" real\n);\n\nQuestion: Name the titles for tko 11/12"
},
{
"role": "assistant",
"content": "SELECT \"titles\" FROM \"list_of_boxing_septuple_or_seven_divisio\" WHERE \"result\"='TKO 11/12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_boxing_septuple_or_seven_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"defenses\" real\n);\n\nQuestion: Name the most number"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number\") FROM \"list_of_boxing_septuple_or_seven_divisio\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nab_cup_and_premiership_season_results\" (\n \"round\" text,\n \"opposition\" text,\n \"time\" text,\n \"date\" text,\n \"home_away\" text,\n \"venue\" text,\n \"score\" text,\n \"result_margin\" text,\n \"broadcaster\" text,\n \"tv\" text,\n \"ladder_position\" text\n);\n\nQuestion: Where was the game played when the result/margin was won by 70?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"nab_cup_and_premiership_season_results\" WHERE \"result_margin\"='WON by 70';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nab_cup_and_premiership_season_results\" (\n \"round\" text,\n \"opposition\" text,\n \"time\" text,\n \"date\" text,\n \"home_away\" text,\n \"venue\" text,\n \"score\" text,\n \"result_margin\" text,\n \"broadcaster\" text,\n \"tv\" text,\n \"ladder_position\" text\n);\n\nQuestion: What is the result/margin when fox sports 1 broadcast the game played at mcg?"
},
{
"role": "assistant",
"content": "SELECT \"result_margin\" FROM \"nab_cup_and_premiership_season_results\" WHERE \"broadcaster\"='Fox Sports 1' AND \"venue\"='MCG';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nab_cup_and_premiership_season_results\" (\n \"round\" text,\n \"opposition\" text,\n \"time\" text,\n \"date\" text,\n \"home_away\" text,\n \"venue\" text,\n \"score\" text,\n \"result_margin\" text,\n \"broadcaster\" text,\n \"tv\" text,\n \"ladder_position\" text\n);\n\nQuestion: Which network broadcast the game when the Western Bulldogs played melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"broadcaster\" FROM \"nab_cup_and_premiership_season_results\" WHERE \"opposition\"='Melbourne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nab_cup_and_premiership_season_results\" (\n \"round\" text,\n \"opposition\" text,\n \"time\" text,\n \"date\" text,\n \"home_away\" text,\n \"venue\" text,\n \"score\" text,\n \"result_margin\" text,\n \"broadcaster\" text,\n \"tv\" text,\n \"ladder_position\" text\n);\n\nQuestion: Where was the game played when the score was 14.16 (100)-12.12 (84)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"nab_cup_and_premiership_season_results\" WHERE \"score\"='14.16 (100)-12.12 (84)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nab_cup_and_premiership_season_results\" (\n \"round\" text,\n \"opposition\" text,\n \"time\" text,\n \"date\" text,\n \"home_away\" text,\n \"venue\" text,\n \"score\" text,\n \"result_margin\" text,\n \"broadcaster\" text,\n \"tv\" text,\n \"ladder_position\" text\n);\n\nQuestion: What was the ladder position when the score was 15.9 (99)\u201314.6 (90)?"
},
{
"role": "assistant",
"content": "SELECT \"ladder_position\" FROM \"nab_cup_and_premiership_season_results\" WHERE \"score\"='15.9 (99)\u201314.6 (90)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nab_cup_and_premiership_season_results\" (\n \"round\" text,\n \"opposition\" text,\n \"time\" text,\n \"date\" text,\n \"home_away\" text,\n \"venue\" text,\n \"score\" text,\n \"result_margin\" text,\n \"broadcaster\" text,\n \"tv\" text,\n \"ladder_position\" text\n);\n\nQuestion: On what date was the game played when the Western Bulldogs were in 8th ladder position and hawthorn was the opposing team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nab_cup_and_premiership_season_results\" WHERE \"ladder_position\"='8th' AND \"opposition\"='Hawthorn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24935743_2\" (\n \"school\" text,\n \"nickname\" text,\n \"location\" text,\n \"colors\" text,\n \"type\" text,\n \"membership_tenure\" text,\n \"notes\" text\n);\n\nQuestion: What school is nicknamed the panthers?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"table1_24935743_2\" WHERE \"nickname\"='Panthers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24935743_2\" (\n \"school\" text,\n \"nickname\" text,\n \"location\" text,\n \"colors\" text,\n \"type\" text,\n \"membership_tenure\" text,\n \"notes\" text\n);\n\nQuestion: What school is in Jeromesville?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"table1_24935743_2\" WHERE \"school\"='Jeromesville';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.