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 \"roster\" (\n \"name\" text,\n \"num\" real,\n \"position\" text,\n \"height\" text,\n \"weight_lb\" real,\n \"year\" text,\n \"hometown\" text,\n \"previous_school\" text\n);\n\nQuestion: What was the previous school of the ft7in (m) tall player?"
},
{
"role": "assistant",
"content": "SELECT \"previous_school\" FROM \"roster\" WHERE \"height\"='ft7in (m)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"num\" real,\n \"position\" text,\n \"height\" text,\n \"weight_lb\" real,\n \"year\" text,\n \"hometown\" text,\n \"previous_school\" text\n);\n\nQuestion: What was the previous school of #22?"
},
{
"role": "assistant",
"content": "SELECT \"previous_school\" FROM \"roster\" WHERE \"num\"=22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the title of the episode with production code 3x5402?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_24938621_2\" WHERE \"production_code\"='3X5402';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the title of the episode with production code 3x5405?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_24938621_2\" WHERE \"production_code\"='3X5405';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"season\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who as the home team for game on 5 october 2011?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"league\" WHERE \"date\"='5 October 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"season\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the stadium for the home team of shamrock rovers and result of 3\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"league\" WHERE \"home_team\"='Shamrock Rovers' AND \"result\"='3\u20130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"season\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the away team when the result was 2\u20131 and home team was the bohemians?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"league\" WHERE \"result\"='2\u20131' AND \"home_team\"='Bohemians';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"season\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the home team for the 2013 season and the result was 0\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"league\" WHERE \"season\"='2013' AND \"result\"='0\u20130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"season\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the date for the game at the tallaght stadium and result was 0\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"league\" WHERE \"stadium\"='Tallaght Stadium' AND \"result\"='0\u20131';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24951872_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 opponents played Waldstadion in a game?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"table1_24951872_2\" WHERE \"game_site\"='Waldstadion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24951872_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 maximum week that had attendance of 10738?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"table1_24951872_2\" WHERE \"attendance\"=10738;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote \"Concordia\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_24938621_3\" WHERE \"title\"='\\\"Concordia\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the production code of the episode written by Cathryn Humphris?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_24938621_3\" WHERE \"written_by\"='Cathryn Humphris';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the production code of the episode that had 5.43 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_24938621_3\" WHERE \"u_s_viewers_million\"='5.43';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What was the title of the episode directed by Jesse Warn?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_24938621_3\" WHERE \"directed_by\"='Jesse Warn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24938621_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What episode number was written by Gregg Hurwitz?"
},
{
"role": "assistant",
"content": "SELECT \"no\" FROM \"table1_24938621_3\" WHERE \"written_by\"='Gregg Hurwitz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties_of_foamed_concrete\" (\n \"dry_density_kg_m3\" real,\n \"7_day_compressive_strength_n_mm2\" text,\n \"thermal_conductivity_w_m_k\" text,\n \"modulus_of_elasticity_k_n_mm2\" text,\n \"drying_shrinkage_pct\" text\n);\n\nQuestion: If the dry density is 800, what is the drying shrinkage %?"
},
{
"role": "assistant",
"content": "SELECT \"drying_shrinkage_pct\" FROM \"properties_of_foamed_concrete\" WHERE \"dry_density_kg_m3\"=800;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24961421_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What number in the series was episode 7 in the season?"
},
{
"role": "assistant",
"content": "SELECT \"series_num\" FROM \"table1_24961421_1\" WHERE \"season_num\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24961421_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote \"Voir Dire\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_24961421_1\" WHERE \"title\"='\\\"Voir Dire\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24961421_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: When was \"Rewind\" originally aired?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_24961421_1\" WHERE \"title\"='\\\"Rewind\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24961421_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: How many episodes had the title \"Rise and Fall\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season_num\") FROM \"table1_24961421_1\" WHERE \"title\"='\\\"Rise and Fall\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24961421_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote the episode that had 12.15 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_24961421_1\" WHERE \"u_s_viewers_millions\"='12.15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24961421_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What number in the season was the episode with 12.23 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"season_num\" FROM \"table1_24961421_1\" WHERE \"u_s_viewers_millions\"='12.23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24989925_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 date of the game at Olympic Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"table1_24989925_2\" WHERE \"game_site\"='Olympic Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24989925_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: How many weeks total are there?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"table1_24989925_2\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_24989925_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's record when they played at Rheinenergiestadion?"
},
{
"role": "assistant",
"content": "SELECT \"team_record\" FROM \"table1_24989925_2\" WHERE \"game_site\"='RheinEnergieStadion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: What is the lowest overall number of 09-10 oi 2nd?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"09_10_oi_2nd\") FROM \"pairs\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pairs\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: What is the lowest overall number for 09-10 oi 2nd?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"09_10_oi_2nd\") FROM \"pairs\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: What was the maximum 09-10 i/o best?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"09_10_i_o_best\") FROM \"men\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: If 09-10 i/o best is 972, what is the 09-10 gp/jgp 2nd maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"09_10_gp_jgp_2nd\") FROM \"ice_dancing\" WHERE \"09_10_i_o_best\"=972;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: If the rank is 17, what are the names?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"ice_dancing\" WHERE \"rank\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: If the WS points is 947, what is the 08-09 gp/jgp 2nd ?"
},
{
"role": "assistant",
"content": "SELECT \"08_09_gp_jgp_2nd\" FROM \"ice_dancing\" WHERE \"ws_points\"=947;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"09_10_i_o_best\" real,\n \"09_10_gp_jgp_best\" real,\n \"09_10_gp_jgp_2nd\" real,\n \"09_10_oi_best\" real,\n \"09_10_oi_2nd\" real,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real\n);\n\nQuestion: If the 08-09 gp/jgp 2nd is bigger than 227.0 and the 08-09 gp/jgp best is 252, what is the 08-09 oi best?"
},
{
"role": "assistant",
"content": "SELECT \"08_09_oi_best\" FROM \"ice_dancing\" WHERE \"08_09_gp_jgp_best\"=252 AND \"08_09_gp_jgp_2nd\">227.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_l\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many points did he have when he has in the 34th position? "
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"career_summary\" WHERE \"position\"='34th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_l\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many wins were listed when he had 112 points? "
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"career_summary\" WHERE \"points\"='112';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_l\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: In what series did he have the 7th position? "
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_summary\" WHERE \"position\"='7th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_l\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: what were his points when he was in 8th position? "
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"career_summary\" WHERE \"position\"='8th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25016824_2\" (\n \"air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: What was the vote when the air date is 4 october 1997?"
},
{
"role": "assistant",
"content": "SELECT \"vote\" FROM \"table1_25016824_2\" WHERE \"air_date\"='4 October 1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25016824_2\" (\n \"air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: Who was eliminated when immunity went to kent (j\u00fcrgen)?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated\" FROM \"table1_25016824_2\" WHERE \"immunity\"='Kent (J\u00fcrgen)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25016824_2\" (\n \"air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: Who was eliminated when the vote was 8-1?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated\" FROM \"table1_25016824_2\" WHERE \"vote\"='8-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25016824_2\" (\n \"air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: How many entries are there for vote when the air date was 15 november 1997?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"vote\") FROM \"table1_25016824_2\" WHERE \"air_date\"='15 November 1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25016824_2\" (\n \"air_date\" text,\n \"reward\" text,\n \"immunity\" text,\n \"eliminated\" text,\n \"vote\" text,\n \"finish\" text\n);\n\nQuestion: What was the reward when immunity went to martin and finish is 13th voted out 8th jury member day 46?"
},
{
"role": "assistant",
"content": "SELECT \"reward\" FROM \"table1_25016824_2\" WHERE \"immunity\"='Martin' AND \"finish\"='13th Voted Out 8th Jury Member Day 46';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the position for christopher smith"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_four\" WHERE \"player\"='Christopher Smith';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the college for nate binder"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_four\" WHERE \"player\"='Nate Binder';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the least pick number for steven turner"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"round_four\" WHERE \"player\"='Steven Turner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the cfl team for steven turner"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_four\" WHERE \"player\"='Steven Turner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25017530_6\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the cfl team for lb position"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"table1_25017530_6\" WHERE \"position\"='LB';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25017530_6\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the cfl team for saskatchewan"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"table1_25017530_6\" WHERE \"college\"='Saskatchewan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_25017530_6\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the position for michael warner"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"table1_25017530_6\" WHERE \"player\"='Michael Warner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2_2000_2001\" (\n \"episode_num\" real,\n \"production_count\" real,\n \"original_airdate\" text,\n \"prod_code\" text,\n \"title\" text,\n \"viewing_figures_millions\" text\n);\n\nQuestion: How many episodes were numbered 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"production_count\") FROM \"series_2_2000_2001\" WHERE \"episode_num\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2_2000_2001\" (\n \"episode_num\" real,\n \"production_count\" real,\n \"original_airdate\" text,\n \"prod_code\" text,\n \"title\" text,\n \"viewing_figures_millions\" text\n);\n\nQuestion: What are the original air date(s) for episodes with production code ipea343l?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"series_2_2000_2001\" WHERE \"prod_code\"='IPEA343L';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2_2000_2001\" (\n \"episode_num\" real,\n \"production_count\" real,\n \"original_airdate\" text,\n \"prod_code\" text,\n \"title\" text,\n \"viewing_figures_millions\" text\n);\n\nQuestion: What are the original air date(s) for episodes with production code ipea345a?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"series_2_2000_2001\" WHERE \"prod_code\"='IPEA345A';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2_2000_2001\" (\n \"episode_num\" real,\n \"production_count\" real,\n \"original_airdate\" text,\n \"prod_code\" text,\n \"title\" text,\n \"viewing_figures_millions\" text\n);\n\nQuestion: What are the original air date(s) for episodes with 8.63 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"series_2_2000_2001\" WHERE \"viewing_figures_millions\"='8.63';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_generation_fd\" (\n \"model\" text,\n \"power\" text,\n \"torque\" text,\n \"gearbox\" text,\n \"weight\" text,\n \"seating\" text,\n \"brakes\" text,\n \"wheels\" text,\n \"tyres\" text\n);\n\nQuestion: What is the power of the Type R?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"third_generation_fd\" WHERE \"model\"='Type R';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_generation_fd\" (\n \"model\" text,\n \"power\" text,\n \"torque\" text,\n \"gearbox\" text,\n \"weight\" text,\n \"seating\" text,\n \"brakes\" text,\n \"wheels\" text,\n \"tyres\" text\n);\n\nQuestion: What kind of brakes for the model type rb 4at with 16x8.0jj (front) 16x8.0jj (rear) wheels and 225/50r16 92v(front) 225/50r16 92v(rear) tyres?"
},
{
"role": "assistant",
"content": "SELECT \"brakes\" FROM \"third_generation_fd\" WHERE \"wheels\"='16x8.0JJ (front) 16x8.0JJ (rear)' AND \"tyres\"='225/50R16 92V(front) 225/50R16 92V(rear)' AND \"model\"='Type RB 4AT';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_generation_fd\" (\n \"model\" text,\n \"power\" text,\n \"torque\" text,\n \"gearbox\" text,\n \"weight\" text,\n \"seating\" text,\n \"brakes\" text,\n \"wheels\" text,\n \"tyres\" text\n);\n\nQuestion: What brakes for the 4-speed automatic gearbox?"
},
{
"role": "assistant",
"content": "SELECT \"brakes\" FROM \"third_generation_fd\" WHERE \"gearbox\"='4-speed automatic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_generation_fd\" (\n \"model\" text,\n \"power\" text,\n \"torque\" text,\n \"gearbox\" text,\n \"weight\" text,\n \"seating\" text,\n \"brakes\" text,\n \"wheels\" text,\n \"tyres\" text\n);\n\nQuestion: What is the power for the Spirit R (Type B)?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"third_generation_fd\" WHERE \"model\"='Spirit R (Type B)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_generation_fd\" (\n \"model\" text,\n \"power\" text,\n \"torque\" text,\n \"gearbox\" text,\n \"weight\" text,\n \"seating\" text,\n \"brakes\" text,\n \"wheels\" text,\n \"tyres\" text\n);\n\nQuestion: What is the gearbox when the torque is torque?"
},
{
"role": "assistant",
"content": "SELECT \"gearbox\" FROM \"third_generation_fd\" WHERE \"torque\"='Torque';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alabama\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the first elected for alabama 3"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"alabama\" WHERE \"district\"='Alabama 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alabama\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the party for spencer bachus"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"alabama\" WHERE \"incumbent\"='Spencer Bachus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alabama\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the district for mike rogers"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"alabama\" WHERE \"incumbent\"='Mike Rogers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alabama\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the district for spencer bachus"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"alabama\" WHERE \"incumbent\"='Spencer Bachus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: In what district was keith ellison the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"minnesota\" WHERE \"incumbent\"='Keith Ellison';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"am\" (\n \"freq\" real,\n \"call\" text,\n \"city\" text,\n \"owner\" text,\n \"start\" real,\n \"day_power_w\" real,\n \"night_power\" real,\n \"nickname\" text,\n \"format\" text,\n \"stereo\" text\n);\n\nQuestion: List the kilo watt hoours per day for moline."
},
{
"role": "assistant",
"content": "SELECT \"day_power_w\" FROM \"am\" WHERE \"city\"='Moline';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"am\" (\n \"freq\" real,\n \"call\" text,\n \"city\" text,\n \"owner\" text,\n \"start\" real,\n \"day_power_w\" real,\n \"night_power\" real,\n \"nickname\" text,\n \"format\" text,\n \"stereo\" text\n);\n\nQuestion: In which year did the voice of muscatine show start?"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"am\" WHERE \"nickname\"='Voice of Muscatine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"am\" (\n \"freq\" real,\n \"call\" text,\n \"city\" text,\n \"owner\" text,\n \"start\" real,\n \"day_power_w\" real,\n \"night_power\" real,\n \"nickname\" text,\n \"format\" text,\n \"stereo\" text\n);\n\nQuestion: In what year was cumulus founded?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"start\") FROM \"am\" WHERE \"owner\"='Cumulus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"am\" (\n \"freq\" real,\n \"call\" text,\n \"city\" text,\n \"owner\" text,\n \"start\" real,\n \"day_power_w\" real,\n \"night_power\" real,\n \"nickname\" text,\n \"format\" text,\n \"stereo\" text\n);\n\nQuestion: Does the city of moline have stereo?"
},
{
"role": "assistant",
"content": "SELECT \"stereo\" FROM \"am\" WHERE \"city\"='Moline';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_plants\" (\n \"company\" text,\n \"parent_company\" text,\n \"parent_headquarters\" text,\n \"plant\" text,\n \"models_produced\" text,\n \"production_latest_figures\" text\n);\n\nQuestion: what is the company with the parent company wrightbus?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"assembly_plants\" WHERE \"parent_company\"='Wrightbus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_plants\" (\n \"company\" text,\n \"parent_company\" text,\n \"parent_headquarters\" text,\n \"plant\" text,\n \"models_produced\" text,\n \"production_latest_figures\" text\n);\n\nQuestion: what is the name ofhte company where the plant is in burnaston?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"assembly_plants\" WHERE \"plant\"='Burnaston';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_plants\" (\n \"company\" text,\n \"parent_company\" text,\n \"parent_headquarters\" text,\n \"plant\" text,\n \"models_produced\" text,\n \"production_latest_figures\" text\n);\n\nQuestion: what models are produced where the plant is scarborough?"
},
{
"role": "assistant",
"content": "SELECT \"models_produced\" FROM \"assembly_plants\" WHERE \"plant\"='Scarborough';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_plants\" (\n \"company\" text,\n \"parent_company\" text,\n \"parent_headquarters\" text,\n \"plant\" text,\n \"models_produced\" text,\n \"production_latest_figures\" text\n);\n\nQuestion: how many models produced where the plant is castle bromwich?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"models_produced\") FROM \"assembly_plants\" WHERE \"plant\"='Castle Bromwich';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_plants\" (\n \"company\" text,\n \"parent_company\" text,\n \"parent_headquarters\" text,\n \"plant\" text,\n \"models_produced\" text,\n \"production_latest_figures\" text\n);\n\nQuestion: what is the production where the parent company is ariel?"
},
{
"role": "assistant",
"content": "SELECT \"production_latest_figures\" FROM \"assembly_plants\" WHERE \"parent_company\"='Ariel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_part_time_indy_car_series_teams\" (\n \"team\" text,\n \"num\" real,\n \"primary_sponsor\" text,\n \"driver_s\" text,\n \"listed_owner_s\" text,\n \"engine\" text,\n \"chassis\" text\n);\n\nQuestion: What kind of chassis on the angie's list sponsored car?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"active_part_time_indy_car_series_teams\" WHERE \"primary_sponsor\"='Angie''s List';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_part_time_indy_car_series_teams\" (\n \"team\" text,\n \"num\" real,\n \"primary_sponsor\" text,\n \"driver_s\" text,\n \"listed_owner_s\" text,\n \"engine\" text,\n \"chassis\" text\n);\n\nQuestion: What team owns the car owned by chip ganassi?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"active_part_time_indy_car_series_teams\" WHERE \"listed_owner_s\"='Chip Ganassi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_part_time_indy_car_series_teams\" (\n \"team\" text,\n \"num\" real,\n \"primary_sponsor\" text,\n \"driver_s\" text,\n \"listed_owner_s\" text,\n \"engine\" text,\n \"chassis\" text\n);\n\nQuestion: What chassis is on the car repped by team rahal letterman lanigan racing?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"active_part_time_indy_car_series_teams\" WHERE \"team\"='Rahal Letterman Lanigan Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_part_time_indy_car_series_teams\" (\n \"team\" text,\n \"num\" real,\n \"primary_sponsor\" text,\n \"driver_s\" text,\n \"listed_owner_s\" text,\n \"engine\" text,\n \"chassis\" text\n);\n\nQuestion: Who drives the abc supply sponsored cor?"
},
{
"role": "assistant",
"content": "SELECT \"driver_s\" FROM \"active_part_time_indy_car_series_teams\" WHERE \"primary_sponsor\"='ABC Supply';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the number of district for tom marino"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"pennsylvania\" WHERE \"incumbent\"='Tom Marino';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the district for 1994"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"pennsylvania\" WHERE \"first_elected\"=1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the party for pennsylvania 10"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the result for glenn thompson"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"pennsylvania\" WHERE \"incumbent\"='Glenn Thompson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the number of district for bill shuster"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"pennsylvania\" WHERE \"incumbent\"='Bill Shuster';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_statistics\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"boston_breakers_career\" text,\n \"appearances\" real,\n \"starts\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: List the total play time for 11 starts."
},
{
"role": "assistant",
"content": "SELECT MAX(\"minutes\") FROM \"all_time_statistics\" WHERE \"starts\"=11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_net_enrollment_ratio_in_education\" (\n \"region\" text,\n \"preschool_0_5_years\" text,\n \"primary_6_13_years\" text,\n \"secondary_14_17_years\" text,\n \"tertiary_18_24_years\" text\n);\n\nQuestion: In what region is the enrollment ratio in primary 94.40?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"by_net_enrollment_ratio_in_education\" WHERE \"primary_6_13_years\"='94.40';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_net_enrollment_ratio_in_education\" (\n \"region\" text,\n \"preschool_0_5_years\" text,\n \"primary_6_13_years\" text,\n \"secondary_14_17_years\" text,\n \"tertiary_18_24_years\" text\n);\n\nQuestion: What is the enrollment ratio for preschool in the region where enrollment ratio for tertiary is 29.55?"
},
{
"role": "assistant",
"content": "SELECT \"preschool_0_5_years\" FROM \"by_net_enrollment_ratio_in_education\" WHERE \"tertiary_18_24_years\"='29.55';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_net_enrollment_ratio_in_education\" (\n \"region\" text,\n \"preschool_0_5_years\" text,\n \"primary_6_13_years\" text,\n \"secondary_14_17_years\" text,\n \"tertiary_18_24_years\" text\n);\n\nQuestion: What is the enrollment ratio in primary in the region where the enrollment ratio in preschool is 38.14?"
},
{
"role": "assistant",
"content": "SELECT \"primary_6_13_years\" FROM \"by_net_enrollment_ratio_in_education\" WHERE \"preschool_0_5_years\"='38.14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_net_enrollment_ratio_in_education\" (\n \"region\" text,\n \"preschool_0_5_years\" text,\n \"primary_6_13_years\" text,\n \"secondary_14_17_years\" text,\n \"tertiary_18_24_years\" text\n);\n\nQuestion: What is the enrollment ratio in tertiary in the region where the enrollment ration in secondary is 71.43?"
},
{
"role": "assistant",
"content": "SELECT \"tertiary_18_24_years\" FROM \"by_net_enrollment_ratio_in_education\" WHERE \"secondary_14_17_years\"='71.43';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_net_enrollment_ratio_in_education\" (\n \"region\" text,\n \"preschool_0_5_years\" text,\n \"primary_6_13_years\" text,\n \"secondary_14_17_years\" text,\n \"tertiary_18_24_years\" text\n);\n\nQuestion: What is the enrollment ratio in preschool in the region where the enrollment ratio in primary is 93.10?"
},
{
"role": "assistant",
"content": "SELECT \"preschool_0_5_years\" FROM \"by_net_enrollment_ratio_in_education\" WHERE \"primary_6_13_years\"='93.10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_net_enrollment_ratio_in_education\" (\n \"region\" text,\n \"preschool_0_5_years\" text,\n \"primary_6_13_years\" text,\n \"secondary_14_17_years\" text,\n \"tertiary_18_24_years\" text\n);\n\nQuestion: What is the enrollment ration in primary in the region where the enrollment ratio in preschool is 50.23? "
},
{
"role": "assistant",
"content": "SELECT \"primary_6_13_years\" FROM \"by_net_enrollment_ratio_in_education\" WHERE \"preschool_0_5_years\"='50.23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_electorate\" (\n \"region\" text,\n \"enrolled_men\" real,\n \"enrolled_women\" real,\n \"enrolled_total\" real,\n \"men_of_voting_age\" real,\n \"women_of_voting_age\" real,\n \"voting_age_population\" real,\n \"e_vap_ratio_men\" text,\n \"e_vap_ratio_women\" text,\n \"e_vap_ratio_total\" text\n);\n\nQuestion: what is the number of registered female voters where the percentage is 108.6%"
},
{
"role": "assistant",
"content": "SELECT \"enrolled_women\" FROM \"by_electorate\" WHERE \"e_vap_ratio_women\"='108.6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_electorate\" (\n \"region\" text,\n \"enrolled_men\" real,\n \"enrolled_women\" real,\n \"enrolled_total\" real,\n \"men_of_voting_age\" real,\n \"women_of_voting_age\" real,\n \"voting_age_population\" real,\n \"e_vap_ratio_men\" text,\n \"e_vap_ratio_women\" text,\n \"e_vap_ratio_total\" text\n);\n\nQuestion: what is the percentage of male voters where the level of maturity is 123726"
},
{
"role": "assistant",
"content": "SELECT \"e_vap_ratio_total\" FROM \"by_electorate\" WHERE \"men_of_voting_age\"=123726;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_prison_inmates_and_incarceration_rate\" (\n \"region\" text,\n \"prison_inmates_men\" real,\n \"prison_inmates_women\" real,\n \"prison_inmates_total\" real,\n \"incarceration_rate_male\" real,\n \"incarceration_rate_female\" real,\n \"incarceration_rate_total\" real,\n \"country_comparison\" text\n);\n\nQuestion: How many regions had 153 women prison inmates?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incarceration_rate_total\") FROM \"by_prison_inmates_and_incarceration_rate\" WHERE \"prison_inmates_women\"=153;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_prison_inmates_and_incarceration_rate\" (\n \"region\" text,\n \"prison_inmates_men\" real,\n \"prison_inmates_women\" real,\n \"prison_inmates_total\" real,\n \"incarceration_rate_male\" real,\n \"incarceration_rate_female\" real,\n \"incarceration_rate_total\" real,\n \"country_comparison\" text\n);\n\nQuestion: How many regions had an incarceration rate for females of 63?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incarceration_rate_total\") FROM \"by_prison_inmates_and_incarceration_rate\" WHERE \"incarceration_rate_female\"=63;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_prison_inmates_and_incarceration_rate\" (\n \"region\" text,\n \"prison_inmates_men\" real,\n \"prison_inmates_women\" real,\n \"prison_inmates_total\" real,\n \"incarceration_rate_male\" real,\n \"incarceration_rate_female\" real,\n \"incarceration_rate_total\" real,\n \"country_comparison\" text\n);\n\nQuestion: What is the male incarceration rate of maule?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"incarceration_rate_male\") FROM \"by_prison_inmates_and_incarceration_rate\" WHERE \"region\"='Maule';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_ownership_of_goods_and_services\" (\n \"region\" text,\n \"vehicle\" text,\n \"automatic_washing_machine\" text,\n \"refrigerator\" text,\n \"water_heater\" text,\n \"fixed_telephone_line\" text,\n \"mobile_phone\" text,\n \"cable_sat_tv_connection\" text\n);\n\nQuestion: Name the region for automatic washing machine being 60.9%"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"by_ownership_of_goods_and_services\" WHERE \"automatic_washing_machine\"='60.9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_ownership_of_goods_and_services\" (\n \"region\" text,\n \"vehicle\" text,\n \"automatic_washing_machine\" text,\n \"refrigerator\" text,\n \"water_heater\" text,\n \"fixed_telephone_line\" text,\n \"mobile_phone\" text,\n \"cable_sat_tv_connection\" text\n);\n\nQuestion: Name the fixed telephone line for 25.6% vehicle"
},
{
"role": "assistant",
"content": "SELECT \"fixed_telephone_line\" FROM \"by_ownership_of_goods_and_services\" WHERE \"vehicle\"='25.6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_ownership_of_goods_and_services\" (\n \"region\" text,\n \"vehicle\" text,\n \"automatic_washing_machine\" text,\n \"refrigerator\" text,\n \"water_heater\" text,\n \"fixed_telephone_line\" text,\n \"mobile_phone\" text,\n \"cable_sat_tv_connection\" text\n);\n\nQuestion: Name the region for 39.2% vehicle"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"by_ownership_of_goods_and_services\" WHERE \"vehicle\"='39.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_access_to_electricity\" (\n \"region\" text,\n \"public_network\" text,\n \"own_community_generator\" text,\n \"solar_panel\" text,\n \"other_source\" text,\n \"none\" text\n);\n\nQuestion: What region has 0.3% solar panel?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"by_access_to_electricity\" WHERE \"solar_panel\"='0.3%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_access_to_electricity\" (\n \"region\" text,\n \"public_network\" text,\n \"own_community_generator\" text,\n \"solar_panel\" text,\n \"other_source\" text,\n \"none\" text\n);\n\nQuestion: What is atacama's percentage of solar panels?"
},
{
"role": "assistant",
"content": "SELECT \"solar_panel\" FROM \"by_access_to_electricity\" WHERE \"region\"='Atacama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_access_to_electricity\" (\n \"region\" text,\n \"public_network\" text,\n \"own_community_generator\" text,\n \"solar_panel\" text,\n \"other_source\" text,\n \"none\" text\n);\n\nQuestion: Which region has 0.6% none?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"by_access_to_electricity\" WHERE \"none\"='0.6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_access_to_electricity\" (\n \"region\" text,\n \"public_network\" text,\n \"own_community_generator\" text,\n \"solar_panel\" text,\n \"other_source\" text,\n \"none\" text\n);\n\nQuestion: What is the percentage of public network in the region that has 0.1% other sources, 0.0% solar, and is named maule?"
},
{
"role": "assistant",
"content": "SELECT \"public_network\" FROM \"by_access_to_electricity\" WHERE \"other_source\"='0.1%' AND \"solar_panel\"='0.0%' AND \"region\"='Maule';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.