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 \"sandy_bridge_quad_core_32_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the release price for the GPU frequency of standard power, embedded?" }, { "role": "assistant", "content": "SELECT \"release_price_usd\" FROM \"sandy_bridge_quad_core_32_nm\" WHERE \"gpu_frequency\"='standard power, embedded';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sandy_bridge_quad_core_32_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is the socked when the turbo is 8/8/10/11?" }, { "role": "assistant", "content": "SELECT \"socket\" FROM \"sandy_bridge_quad_core_32_nm\" WHERE \"turbo\"='8/8/10/11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which round did the bout that led to a 1-0 record end in?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='1-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which Time has a Lane smaller than 2, and a Nationality of spain?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heats\" WHERE \"lane\"<2 AND \"nationality\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: How many Heats have a Name of miguel molina?" }, { "role": "assistant", "content": "SELECT COUNT(\"heat\") FROM \"heats\" WHERE \"name\"='miguel molina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"year\" text,\n \"league\" text,\n \"position\" text,\n \"leading_scorer\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text\n);\n\nQuestion: what is the league when the fa cup is qr4 and the fa trophy is qf?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"league_standings\" WHERE \"fa_cup\"='qr4' AND \"fa_trophy\"='qf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"year\" text,\n \"league\" text,\n \"position\" text,\n \"leading_scorer\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text\n);\n\nQuestion: what is the fa trophy when the leading scorer is lee gregory (8)?" }, { "role": "assistant", "content": "SELECT \"fa_trophy\" FROM \"league_standings\" WHERE \"leading_scorer\"='lee gregory (8)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"year\" text,\n \"league\" text,\n \"position\" text,\n \"leading_scorer\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text\n);\n\nQuestion: what is the year when the position is 1/22 promoted and the leading scorer is james dean (27)?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"league_standings\" WHERE \"position\"='1/22 promoted' AND \"leading_scorer\"='james dean (27)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: When the Altrincham was the home team what was the tie no?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round\" WHERE \"home_team\"='altrincham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Crawley Town as the home team has what as the tie no?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round\" WHERE \"home_team\"='crawley town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the nationality of the swimmer with a rank over 2 with a time of 55.77?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"heats\" WHERE \"rank\">2 AND \"time\"='55.77';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the earliest heat with a finisher from the Czech Republic and a rank over 41?" }, { "role": "assistant", "content": "SELECT MIN(\"heat\") FROM \"heats\" WHERE \"nationality\"='czech republic' AND \"rank\">41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the total number of heats with a finisher named Gregor Tait in lanes over 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"heat\") FROM \"heats\" WHERE \"name\"='gregor tait' AND \"lane\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the time of the swimmer in rank 40?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heats\" WHERE \"rank\"=40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1943\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: From what series was Tokio Jokio, directed by Norm McCabe?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1943\" WHERE \"director\"='norm mccabe' AND \"title\"='tokio jokio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1943\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: When was Inki and the Minah Bird released?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1943\" WHERE \"title\"='inki and the minah bird';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1945\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: From what series is Peck Up Your Troubles?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1945\" WHERE \"title\"='peck up your troubles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_rankings\" (\n \"year\" real,\n \"political_rights\" real,\n \"civil_liberties\" real,\n \"status\" text,\n \"president\" text\n);\n\nQuestion: When the president was Yoweri Museveni, and the year was 1993, with rank of 6 under political rights, what was the total of civil liberties?" }, { "role": "assistant", "content": "SELECT SUM(\"civil_liberties\") FROM \"historical_rankings\" WHERE \"political_rights\"=6 AND \"president\"='yoweri museveni' AND \"year\"=1993;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_rankings\" (\n \"year\" real,\n \"political_rights\" real,\n \"civil_liberties\" real,\n \"status\" text,\n \"president\" text\n);\n\nQuestion: What is the year average when not free was the status, and less than 7 was the civil liberties, and less than 6 political rights?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"historical_rankings\" WHERE \"status\"='not free' AND \"civil_liberties\"<7 AND \"political_rights\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_rankings\" (\n \"year\" real,\n \"political_rights\" real,\n \"civil_liberties\" real,\n \"status\" text,\n \"president\" text\n);\n\nQuestion: What is the least political rights rank in 1976?" }, { "role": "assistant", "content": "SELECT MIN(\"political_rights\") FROM \"historical_rankings\" WHERE \"year\"=1976;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is average ratings for Japanese title of \u30db\u30bf\u30eb\u30ce\u30d2\u30ab\u30ea, with episodes larger than 9?" }, { "role": "assistant", "content": "SELECT \"average_ratings\" FROM \"2007_summer_season\" WHERE \"episodes\">9 AND \"japanese_title\"='\u30db\u30bf\u30eb\u30ce\u30d2\u30ab\u30ea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which episodes has the lowest average ratings of 8.7%?" }, { "role": "assistant", "content": "SELECT MIN(\"episodes\") FROM \"2007_summer_season\" WHERE \"average_ratings\"='8.7%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which romaji title, has Japanese title of \u83ca\u6b21\u90ce\u3068\u3055\u304d 3?" }, { "role": "assistant", "content": "SELECT \"romaji_title\" FROM \"2007_summer_season\" WHERE \"japanese_title\"='\u83ca\u6b21\u90ce\u3068\u3055\u304d 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which TV station, has romaji title of tantei gakuen q and episodes larger than 10?" }, { "role": "assistant", "content": "SELECT \"tv_station\" FROM \"2007_summer_season\" WHERE \"episodes\">10 AND \"romaji_title\"='tantei gakuen q';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"sergey_filimonov_kaz\" text,\n \"173kg\" text,\n \"almaty_kazakhstan\" text\n);\n\nQuestion: What is the snatch for the person holding the Olympic record, and 173kg of 172kg?" }, { "role": "assistant", "content": "SELECT \"snatch\" FROM \"records\" WHERE \"world_record\"='olympic record' AND \"173kg\"='172kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"sergey_filimonov_kaz\" text,\n \"173kg\" text,\n \"almaty_kazakhstan\" text\n);\n\nQuestion: What is the Almaty, Kazakhstan when Sergey Filimonov ( KAZ ) is 210kg?" }, { "role": "assistant", "content": "SELECT \"almaty_kazakhstan\" FROM \"records\" WHERE \"sergey_filimonov_kaz\"='210kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"sergey_filimonov_kaz\" text,\n \"173kg\" text,\n \"almaty_kazakhstan\" text\n);\n\nQuestion: What shows for Sergey Filimonov (KAZ) when the Snatch shows snatch?" }, { "role": "assistant", "content": "SELECT \"sergey_filimonov_kaz\" FROM \"records\" WHERE \"snatch\"='snatch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"sergey_filimonov_kaz\" text,\n \"173kg\" text,\n \"almaty_kazakhstan\" text\n);\n\nQuestion: What is the Almaty, Kazakhstan when the Sergey Filimonov (KAZ) is 210kg?" }, { "role": "assistant", "content": "SELECT \"almaty_kazakhstan\" FROM \"records\" WHERE \"sergey_filimonov_kaz\"='210kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total weeks with more 56,134 attendees against the minnesota vikings?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\">'56,134' AND \"opponent\"='minnesota vikings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: What year was the main role a character named Guan Yu (\u95dc\u7fbd)?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"television_series\" WHERE \"role\"='main' AND \"character\"='guan yu (\u95dc\u7fbd)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: What is the English character for Lin Ming Kuan (\u6797\u660e\u5bec)?" }, { "role": "assistant", "content": "SELECT \"english\" FROM \"television_series\" WHERE \"character\"='lin ming kuan (\u6797\u660e\u5bec)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: What character has a Year larger than 2010 with a lead role, and Chinese Title of \u6200\u590f38\u2103?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"television_series\" WHERE \"year\">2010 AND \"role\"='lead role' AND \"chinese_title\"='\u6200\u590f38\u2103';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"chinese_title\" text,\n \"english\" text,\n \"role\" text,\n \"character\" text\n);\n\nQuestion: What is the year that has a character named Wu Ji Wei (\u7121\u6975\u5a01)?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"television_series\" WHERE \"character\"='wu ji wei (\u7121\u6975\u5a01)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Which Round has an Opponent of aleksandr pitchkounov?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"kickboxing_record\" WHERE \"opponent\"='aleksandr pitchkounov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Which Result has a Round of 5, and an Event of mt one?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"kickboxing_record\" WHERE \"round\"=5 AND \"event\"='mt one';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1948_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Mortlake club has more than 924 against, less than 14 losses, and how many total draws?" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"1948_ladder\" WHERE \"against\">924 AND \"club\"='mortlake' AND \"losses\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1948_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of wins for Cobden club when there are more than 2 draws?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"1948_ladder\" WHERE \"club\"='cobden' AND \"draws\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1948_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: When against is 797 and wins is more than 10, what is the sum of draws?" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"1948_ladder\" WHERE \"against\"=797 AND \"wins\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1948_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Club warrnambool has less than 9 wins and what average of draws?" }, { "role": "assistant", "content": "SELECT AVG(\"draws\") FROM \"1948_ladder\" WHERE \"wins\"<9 AND \"club\"='warrnambool';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1948_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average number of draws for Mortlake club when they have less than 0 wins?" }, { "role": "assistant", "content": "SELECT AVG(\"draws\") FROM \"1948_ladder\" WHERE \"club\"='mortlake' AND \"wins\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"name\" text,\n \"geographic_code\" text,\n \"type\" text,\n \"households\" real,\n \"population_2004\" real,\n \"foreign_population\" real,\n \"moroccan_population\" real\n);\n\nQuestion: Which Foreign population has a Population (2004) larger than 234733?" }, { "role": "assistant", "content": "SELECT AVG(\"foreign_population\") FROM \"subdivisions\" WHERE \"population_2004\">234733;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"name\" text,\n \"geographic_code\" text,\n \"type\" text,\n \"households\" real,\n \"population_2004\" real,\n \"foreign_population\" real,\n \"moroccan_population\" real\n);\n\nQuestion: Which Population (2004) has a Moroccan population larger than 234506?" }, { "role": "assistant", "content": "SELECT AVG(\"population_2004\") FROM \"subdivisions\" WHERE \"moroccan_population\">234506;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cup\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"report\" text\n);\n\nQuestion: What date was the opponent VFL Sindelfingen?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"cup\" WHERE \"opponent\"='vfl sindelfingen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cup\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"report\" text\n);\n\nQuestion: What date was the attendance 1,804?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"cup\" WHERE \"attendance\"='1,804';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cup\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"report\" text\n);\n\nQuestion: Who was the opponent with an attendance of 628?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"cup\" WHERE \"attendance\"='628';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What bike has a grid greater than 17, laps less than 8, with milos cihak as the rider?" }, { "role": "assistant", "content": "SELECT \"bike\" FROM \"superbike_race_1_classification\" WHERE \"grid\">17 AND \"laps\"<8 AND \"rider\"='milos cihak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest grid that has gregorio lavilla as the rider?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"rider\"='gregorio lavilla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What rider has laps less than 20, a ducati 1098 rs 08 as the bike, with accident as the time, and a grid less than 14?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"superbike_race_1_classification\" WHERE \"laps\"<20 AND \"bike\"='ducati 1098 rs 08' AND \"time\"='accident' AND \"grid\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"career\" text,\n \"matches\" real,\n \"overs\" real,\n \"maidens\" real,\n \"runs\" real,\n \"wickets\" real,\n \"average\" real,\n \"best\" text\n);\n\nQuestion: How many overs when there are 5231 runs and fewer than 37 matches?" }, { "role": "assistant", "content": "SELECT SUM(\"overs\") FROM \"references\" WHERE \"runs\"=5231 AND \"matches\"<37;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"career\" text,\n \"matches\" real,\n \"overs\" real,\n \"maidens\" real,\n \"runs\" real,\n \"wickets\" real,\n \"average\" real,\n \"best\" text\n);\n\nQuestion: What are the fewest wickets when player's career spanned 1946-1960 and maidens were more than 419?" }, { "role": "assistant", "content": "SELECT MIN(\"wickets\") FROM \"references\" WHERE \"career\"='1946-1960' AND \"maidens\">419;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"career\" text,\n \"matches\" real,\n \"overs\" real,\n \"maidens\" real,\n \"runs\" real,\n \"wickets\" real,\n \"average\" real,\n \"best\" text\n);\n\nQuestion: What is the largest number of wickets when there are more than 630 maidens and a best of 7/72?" }, { "role": "assistant", "content": "SELECT MAX(\"wickets\") FROM \"references\" WHERE \"maidens\">630 AND \"best\"='7/72';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"career\" text,\n \"matches\" real,\n \"overs\" real,\n \"maidens\" real,\n \"runs\" real,\n \"wickets\" real,\n \"average\" real,\n \"best\" text\n);\n\nQuestion: Who has fewer than 2047.3 overs, more than 200 wickets and an average of 29.02?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"references\" WHERE \"overs\"<2047.3 AND \"wickets\">200 AND \"average\">29.02;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_played\" (\n \"season\" text,\n \"date\" text,\n \"venue\" text,\n \"competition\" text,\n \"score\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: How many people attended the Scottish Cup on 29.02.2000?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"matches_played\" WHERE \"competition\"='scottish cup' AND \"date\"='29.02.2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_played\" (\n \"season\" text,\n \"date\" text,\n \"venue\" text,\n \"competition\" text,\n \"score\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: What was the score of the league cup in the 2007-08 season?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"matches_played\" WHERE \"competition\"='league cup' AND \"season\"='2007-08';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_played\" (\n \"season\" text,\n \"date\" text,\n \"venue\" text,\n \"competition\" text,\n \"score\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: What is the attendance in the game in the 2010-11 season, when the score was 2\u20130?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"matches_played\" WHERE \"season\"='2010-11' AND \"score\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_softball_league_1951_to_19\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What team was in 1st plate in a year later than 1956?" }, { "role": "assistant", "content": "SELECT \"1st_place_team\" FROM \"international_softball_league_1951_to_19\" WHERE \"year\">1956;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_softball_league_1951_to_19\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What location hosted when the National Cash Register, Dayton, Oh was in 4th place in 1957?" }, { "role": "assistant", "content": "SELECT \"host_location\" FROM \"international_softball_league_1951_to_19\" WHERE \"4th_place_team\"='national cash register, dayton, oh' AND \"year\"=1957;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_softball_league_1951_to_19\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What year were the Hoak Packers, Fresno, CA the 4th Place Team?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"international_softball_league_1951_to_19\" WHERE \"4th_place_team\"='hoak packers, fresno, ca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_softball_league_1951_to_19\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What location hosted when Wells Motors, Greeley, Co was the 4th place team?" }, { "role": "assistant", "content": "SELECT \"host_location\" FROM \"international_softball_league_1951_to_19\" WHERE \"4th_place_team\"='wells motors, greeley, co';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_softball_league_1951_to_19\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What year was the 1st Place Team the Hoak Packers, Fresno, CA, and 4th Place was Wells Motors, Greeley, Co?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"international_softball_league_1951_to_19\" WHERE \"1st_place_team\"='hoak packers, fresno, ca' AND \"4th_place_team\"='wells motors, greeley, co';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_softball_league_1951_to_19\" (\n \"year\" real,\n \"1st_place_team\" text,\n \"2nd_place_team\" text,\n \"3rd_place_team\" text,\n \"4th_place_team\" text,\n \"host_location\" text\n);\n\nQuestion: What year was the 4th Place Team of the Wyoming Angus, Johnstown, Co?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"international_softball_league_1951_to_19\" WHERE \"4th_place_team\"='wyoming angus, johnstown, co';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Which base has a company of Theatro Technis Karolos Koun?" }, { "role": "assistant", "content": "SELECT \"base\" FROM \"references\" WHERE \"company\"='theatro technis karolos koun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Which company has an author of Aristophanes and play of Plutus?" }, { "role": "assistant", "content": "SELECT \"company\" FROM \"references\" WHERE \"author\"='aristophanes' AND \"play\"='plutus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Which author has a company of the Semeio Theatre?" }, { "role": "assistant", "content": "SELECT \"author\" FROM \"references\" WHERE \"company\"='semeio theatre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Which play was done by the Radu Stanca National Theatre company?" }, { "role": "assistant", "content": "SELECT \"play\" FROM \"references\" WHERE \"company\"='radu stanca national theatre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Which play had a base of Aosta?" }, { "role": "assistant", "content": "SELECT \"play\" FROM \"references\" WHERE \"base\"='aosta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What is the country of the play based in Athens at the Attis Theatre company?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"base\"='athens' AND \"company\"='attis theatre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tank_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: Which Class has a Quantity larger than 96?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"tank_locomotives\" WHERE \"quantity\">96;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tank_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: How much Quantity has a Type of 1\u2032c1\u2032 h2t?" }, { "role": "assistant", "content": "SELECT COUNT(\"quantity\") FROM \"tank_locomotives\" WHERE \"type\"='1\u2032c1\u2032 h2t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tank_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: Which Class has a Type of 1\u2032c n2t?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"tank_locomotives\" WHERE \"type\"='1\u2032c n2t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tank_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: Which Year(s) of manufacture has a Quantity larger than 39, and a Type of 1\u2032c1\u2032 h2t?" }, { "role": "assistant", "content": "SELECT \"year_s_of_manufacture\" FROM \"tank_locomotives\" WHERE \"quantity\">39 AND \"type\"='1\u2032c1\u2032 h2t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tank_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: Which Year(s) of manufacture has a Quantity of 2, and a Type of b n2t?" }, { "role": "assistant", "content": "SELECT \"year_s_of_manufacture\" FROM \"tank_locomotives\" WHERE \"quantity\"=2 AND \"type\"='b n2t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: what is the highest place when lost is more than 4, points is less than 18 and team is Team of atl\u00e9tico verag\u00fcense?" }, { "role": "assistant", "content": "SELECT MAX(\"place\") FROM \"standings\" WHERE \"lost\">4 AND \"points\"<18 AND \"team\"='atl\u00e9tico verag\u00fcense';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: what is the least lost when the place is higher than 4, goals scored is 12 and points is more than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"lost\") FROM \"standings\" WHERE \"place\">4 AND \"goals_scored\"=12 AND \"points\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: how many times is the team tauro and played less than 18?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"standings\" WHERE \"team\"='tauro' AND \"played\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: what is the least played when points is 36 and place is more than 2?" }, { "role": "assistant", "content": "SELECT MIN(\"played\") FROM \"standings\" WHERE \"points\"=36 AND \"place\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: what is the average points when goals conceded is 14 and goals scored is less than 32?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"standings\" WHERE \"goals_conceded\"=14 AND \"goals_scored\"<32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Playing against the Seattle Seahawks in a week after week 1 before 69,149 people what was the result of the game?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">1 AND \"attendance\"='69,149' AND \"opponent\"='seattle seahawks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many weeks in total has bye as the date?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What country does Tiger Woods come from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_round\" WHERE \"player\"='tiger woods';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"ri_song_hui_prk\" text,\n \"102kg\" text,\n \"busan_south_korea\" text\n);\n\nQuestion: What's the Ri Song-Hui when the olympic record is the world record and snatch was snatch?" }, { "role": "assistant", "content": "SELECT \"ri_song_hui_prk\" FROM \"records\" WHERE \"world_record\"='olympic record' AND \"snatch\"='snatch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"ri_song_hui_prk\" text,\n \"102kg\" text,\n \"busan_south_korea\" text\n);\n\nQuestion: What's the 102kg when the Ri Song-Hui was 226kg?" }, { "role": "assistant", "content": "SELECT \"102kg\" FROM \"records\" WHERE \"ri_song_hui_prk\"='226kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"ri_song_hui_prk\" text,\n \"102kg\" text,\n \"busan_south_korea\" text\n);\n\nQuestion: What's the 102kg when the snatch was snatch and the olympic record was the world record?" }, { "role": "assistant", "content": "SELECT \"102kg\" FROM \"records\" WHERE \"world_record\"='olympic record' AND \"snatch\"='snatch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What was the average pick made by the Texas Rangers?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"first_round_selections\" WHERE \"team\"='texas rangers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What was the home town of Bob Geren, picked by the San Diego Padres?" }, { "role": "assistant", "content": "SELECT \"hometown_school\" FROM \"first_round_selections\" WHERE \"team\"='san diego padres' AND \"player\"='bob geren';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What was the position of Jon Perlman?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"first_round_selections\" WHERE \"player\"='jon perlman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eleventh_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college has a pick smaller than 87 for the position of tackle?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"eleventh_round\" WHERE \"position\"='tackle' AND \"pick\"<87;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eleventh_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college had the pick of 85?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"eleventh_round\" WHERE \"pick\"=85;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1934_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the least losses of Mortlake having less than 970 against?" }, { "role": "assistant", "content": "SELECT MIN(\"losses\") FROM \"1934_ladder\" WHERE \"club\"='mortlake' AND \"against\"<970;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1934_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the total against when the draws are more than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"against\") FROM \"1934_ladder\" WHERE \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1934_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the total wins when the draws are less than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"1934_ladder\" WHERE \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1934_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the least against number for Cobden with draws more than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"against\") FROM \"1934_ladder\" WHERE \"club\"='cobden' AND \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1934_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the most against when the draws are more than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"against\") FROM \"1934_ladder\" WHERE \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1934_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the total wins when there are 1261 against?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"1934_ladder\" WHERE \"against\"=1261;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the notes entry for the row with a Time of 1:42.309?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"heat_1\" WHERE \"time\"='1:42.309';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank for China?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"heat_1\" WHERE \"country\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for Cuba, with a notes entry of QS?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heat_1\" WHERE \"notes\"='qs' AND \"country\"='cuba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Week number on October 10, 1976?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='october 10, 1976';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Date of the game with a Result of L 33\u201314?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 33\u201314';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"augmented_seventh_chord_table\" (\n \"chord\" text,\n \"root\" text,\n \"major_third\" text,\n \"augmented_fifth\" text,\n \"minor_seventh\" text\n);\n\nQuestion: The Major third of D has what for the Augmented fifth?" }, { "role": "assistant", "content": "SELECT \"augmented_fifth\" FROM \"augmented_seventh_chord_table\" WHERE \"major_third\"='d';" } ]