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 \"final_standings\" (\n \"place\" real,\n \"athlete\" text,\n \"long_jump\" real,\n \"javelin\" real,\n \"200_m\" real,\n \"discus\" real,\n \"1500_m\" real,\n \"total\" real\n);\n\nQuestion: Name the least total for 1500m for 2"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"final_standings\" WHERE \"1500_m\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"place\" real,\n \"athlete\" text,\n \"long_jump\" real,\n \"javelin\" real,\n \"200_m\" real,\n \"discus\" real,\n \"1500_m\" real,\n \"total\" real\n);\n\nQuestion: Name the max javelin for 200m for 5"
},
{
"role": "assistant",
"content": "SELECT MAX(\"javelin\") FROM \"final_standings\" WHERE \"200_m\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"place\" real,\n \"athlete\" text,\n \"long_jump\" real,\n \"javelin\" real,\n \"200_m\" real,\n \"discus\" real,\n \"1500_m\" real,\n \"total\" real\n);\n\nQuestion: Name the number of long jump for 1500m being 2"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"long_jump\") FROM \"final_standings\" WHERE \"1500_m\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Name the result for round 13"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"fixtures_and_results\" WHERE \"round\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Name the attendance for loss result and salford city reds"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"fixtures_and_results\" WHERE \"result\"='Loss' AND \"opponent\"='Salford City Reds';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Name the total number of date for round 26"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"fixtures_and_results\" WHERE \"round\"='26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Name the attendace for 23 round"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"fixtures_and_results\" WHERE \"round\"='23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Name the total number of opponets for 05/09/2009"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponent\") FROM \"fixtures_and_results\" WHERE \"date\"='05/09/2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"name\" text,\n \"municipal_status\" text,\n \"census_division\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" text,\n \"area_km\" text,\n \"population_density\" text\n);\n\nQuestion: What is the only city name with a population density of 200?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list\" WHERE \"population_density\"='200';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"name\" text,\n \"municipal_status\" text,\n \"census_division\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" text,\n \"area_km\" text,\n \"population_density\" text\n);\n\nQuestion: What is the census division for the name Stratford?"
},
{
"role": "assistant",
"content": "SELECT \"census_division\" FROM \"list\" WHERE \"name\"='Stratford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"name\" text,\n \"municipal_status\" text,\n \"census_division\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" text,\n \"area_km\" text,\n \"population_density\" text\n);\n\nQuestion: What is the change (%) when the area size (km2) is 247.21?"
},
{
"role": "assistant",
"content": "SELECT \"change_pct\" FROM \"list\" WHERE \"area_km\"='247.21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"name\" text,\n \"municipal_status\" text,\n \"census_division\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" text,\n \"area_km\" text,\n \"population_density\" text\n);\n\nQuestion: What is the municipal status where the population density is 895.5?"
},
{
"role": "assistant",
"content": "SELECT \"municipal_status\" FROM \"list\" WHERE \"population_density\"='895.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"name\" text,\n \"municipal_status\" text,\n \"census_division\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" text,\n \"area_km\" text,\n \"population_density\" text\n);\n\nQuestion: What is the census division for the city named Kenora?"
},
{
"role": "assistant",
"content": "SELECT \"census_division\" FROM \"list\" WHERE \"name\"='Kenora';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"nr\" real,\n \"district\" text,\n \"former_name\" text,\n \"area_ha\" real,\n \"population_2005\" real,\n \"no_of_villages\" real,\n \"density_persons_ha\" text\n);\n\nQuestion: If there are 18 villages, what is the minimum area ?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_ha\") FROM \"administrative_divisions\" WHERE \"no_of_villages\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"nr\" real,\n \"district\" text,\n \"former_name\" text,\n \"area_ha\" real,\n \"population_2005\" real,\n \"no_of_villages\" real,\n \"density_persons_ha\" text\n);\n\nQuestion: With the population in 2005 of 572, what is the former name?"
},
{
"role": "assistant",
"content": "SELECT \"former_name\" FROM \"administrative_divisions\" WHERE \"population_2005\"=572;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"nr\" real,\n \"district\" text,\n \"former_name\" text,\n \"area_ha\" real,\n \"population_2005\" real,\n \"no_of_villages\" real,\n \"density_persons_ha\" text\n);\n\nQuestion: How many villages have a density persons/ha of 5.5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_of_villages\") FROM \"administrative_divisions\" WHERE \"density_persons_ha\"='5.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_8_3_titles_5_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What were the scores for matches with irving wright hazel hotchkiss wightman?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"mixed_doubles_8_3_titles_5_runner_ups\" WHERE \"opponents\"='Irving Wright Hazel Hotchkiss Wightman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_8_3_titles_5_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: How many years had scores of 10\u201312, 6\u20131, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"mixed_doubles_8_3_titles_5_runner_ups\" WHERE \"score\"='10\u201312, 6\u20131, 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_8_3_titles_5_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were the partners during times that harry johnson hazel hotchkiss wightman was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"mixed_doubles_8_3_titles_5_runner_ups\" WHERE \"opponents\"='Harry Johnson Hazel Hotchkiss Wightman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_8_3_titles_5_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What were the outcomes of matches with bill tilden florence ballin as opponents?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"mixed_doubles_8_3_titles_5_runner_ups\" WHERE \"opponents\"='Bill Tilden Florence Ballin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_8_3_titles_5_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the earliest year?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"mixed_doubles_8_3_titles_5_runner_ups\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21304131_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"survivor_count\" real\n);\n\nQuestion: What was the survivor count for the episode directed by Gwyneth Horder-Payton?"
},
{
"role": "assistant",
"content": "SELECT \"survivor_count\" FROM \"table1_21304131_2\" WHERE \"directed_by\"='Gwyneth Horder-Payton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21304131_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"survivor_count\" real\n);\n\nQuestion: When did series number 65 originally air?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_21304131_2\" WHERE \"no_in_series\"=65;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21304155_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the production code of the episode directed by David Solomon? "
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_21304155_1\" WHERE \"directed_by\"='David Solomon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21304155_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote the episode with the production code of BN103? "
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21304155_1\" WHERE \"production_code\"='BN103';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21304155_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the original air date of the episode that had 4.08 million U.S. viewers? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_21304155_1\" WHERE \"u_s_viewers_millions\"='4.08';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_213088_1\" (\n \"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4\" text,\n \"reactor_type\" text,\n \"status\" text,\n \"net_capacity_mw\" real,\n \"gross_capacity_mw\" real\n);\n\nQuestion: List all the locations where net capacity is 950?"
},
{
"role": "assistant",
"content": "SELECT \"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4\" FROM \"table1_213088_1\" WHERE \"net_capacity_mw\"=950;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_213088_1\" (\n \"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4\" text,\n \"reactor_type\" text,\n \"status\" text,\n \"net_capacity_mw\" real,\n \"gross_capacity_mw\" real\n);\n\nQuestion: List all the locations with a RBMK-1000 reactor."
},
{
"role": "assistant",
"content": "SELECT \"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4\" FROM \"table1_213088_1\" WHERE \"reactor_type\"='RBMK-1000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_213088_1\" (\n \"location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_for_kostroma_1_and_2_table_31_technology_and_soviet_energy_availability_november_1981_ntis_order_num_pb82_133455_for_ignalina_4\" text,\n \"reactor_type\" text,\n \"status\" text,\n \"net_capacity_mw\" real,\n \"gross_capacity_mw\" real\n);\n\nQuestion: What is the gross capacity where the net capacity is 1380?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gross_capacity_mw\") FROM \"table1_213088_1\" WHERE \"net_capacity_mw\"=1380;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21313498_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: when was the premiere when a 3.3 millions of North American watched the episode whose writer was Rob Wright?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_21313498_1\" WHERE \"u_s_viewers_millions\"='3.3' AND \"written_by\"='Rob Wright';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21313498_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: what is the name of the episode which the production code is 62015-08-162"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_21313498_1\" WHERE \"production_code\"='62015-08-162';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21313498_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: in the number of episode in season is 11, who was the writer?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21313498_1\" WHERE \"no_in_season\"=11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312959_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"us_viewers_millions\" text\n);\n\nQuestion: What is the production code for the episode title \"A Wrong Day's Journey into Right\"?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_21312959_1\" WHERE \"title\"='\\\"A Wrong Day''s Journey into Right\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312959_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"us_viewers_millions\" text\n);\n\nQuestion: How many episodes had the us viewers (millions) figure of 5.0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_season\") FROM \"table1_21312959_1\" WHERE \"us_viewers_millions\"='5.0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312959_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"us_viewers_millions\" text\n);\n\nQuestion: Who are the writers for the episode number in series 129?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21312959_1\" WHERE \"no_in_series\"=129;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312959_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"us_viewers_millions\" text\n);\n\nQuestion: What is the us viewers (millions) figure for the episode titled \"Witch Wars\"?"
},
{
"role": "assistant",
"content": "SELECT \"us_viewers_millions\" FROM \"table1_21312959_1\" WHERE \"title\"='\\\"Witch Wars\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312845_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the latest episode in the season directed by Chris Long?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"no_in_season\") FROM \"table1_21312845_1\" WHERE \"directed_by\"='Chris Long';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312845_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who wrote the episodes directed by David Straiton?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21312845_1\" WHERE \"directed_by\"='David Straiton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21312845_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who directed the episode with a production code greater than 4301103.585233785 that was written by Curtis Kheel?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_21312845_1\" WHERE \"production_code\">4301103.585233785 AND \"written_by\"='Curtis Kheel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: How many results were there on 19/06/2009?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"fixtures_and_results\" WHERE \"date\"='19/06/2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What is the round number for the date 19/06/2009?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"fixtures_and_results\" WHERE \"date\"='19/06/2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What is the round number for the venue of Stade de la M\u00e9diterran\u00e9e?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"fixtures_and_results\" WHERE \"venue\"='Stade de la M\u00e9diterran\u00e9e';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" real,\n \"date\" text\n);\n\nQuestion: What was the score when the date was 17/07/2009?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fixtures_and_results\" WHERE \"date\"='17/07/2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Marc Parenteau's position? "
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_five\" WHERE \"player\"='Marc Parenteau';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the smallest pick number for McGill?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"round_five\" WHERE \"college\"='McGill';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Derik Fury plays for which college? "
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_five\" WHERE \"player\"='Derik Fury';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: David Kasouf plays for how many colleges? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"college\") FROM \"round_five\" WHERE \"player\"='David Kasouf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position was drafted by the Hamilton Tiger-Cats? "
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_five\" WHERE \"cfl_team\"='Hamilton Tiger-Cats';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who won when Jamie Green had the best lap?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"race_calendar_and_results\" WHERE \"fastest_lap\"='Jamie Green';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who had the fasted lap in motorsport arena oschersleben?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"race_calendar_and_results\" WHERE \"circuit\"='Motorsport Arena Oschersleben';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: When did Oliver Jarvis have pole position?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar_and_results\" WHERE \"pole_position\"='Oliver Jarvis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did the player for the Hamilton Tiger-Cats go to? "
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_three\" WHERE \"cfl_team\"='Hamilton Tiger-Cats';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many players are at the DT position? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"player\") FROM \"round_three\" WHERE \"position\"='DT';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What team does the player who went to Nebraska play for? "
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_three\" WHERE \"college\"='Nebraska';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest number any of the players were picked at? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_three\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player plays for the Winnipeg Blue Bombers? "
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_three\" WHERE \"cfl_team\"='Winnipeg Blue Bombers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick # for player wes lysack?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_one\" WHERE \"player\"='Wes Lysack';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many clf teams have a pick # of 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"cfl_team\") FROM \"round_one\" WHERE \"pick_num\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many total positions are there for utah college?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"round_one\" WHERE \"college\"='Utah';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which cfl team is manitoba college?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_one\" WHERE \"college\"='Manitoba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which position is cfl team edmonton eskimos for weber state college?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_one\" WHERE \"cfl_team\"='Edmonton Eskimos' AND \"college\"='Weber State';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick # for player wes lysack?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_one\" WHERE \"player\"='Wes Lysack';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21328899_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);\n\nQuestion: When \"i feel good\" is the title and joe sachs is the writer how many series numbers are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"series_num\") FROM \"table1_21328899_1\" WHERE \"written_by\"='Joe Sachs' AND \"title\"='\\\"I Feel Good\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_gmt\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: How many stages of the rally took 14:33.9 for the leader to finish?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"length\") FROM \"special_stages\" WHERE \"time\"='14:33.9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_gmt\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: In which special stage named Tempo 2 was S\u00e9bastien Loeb the leader?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"special_stages\" WHERE \"rally_leader\"='S\u00e9bastien Loeb' AND \"name\"='Tempo 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"day\" text,\n \"stage\" text,\n \"time_gmt\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"time\" text,\n \"avg_spd\" text,\n \"rally_leader\" text\n);\n\nQuestion: Which ralliers won the stages that were at 18:54 GMT?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"special_stages\" WHERE \"time_gmt\"='18:54';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21344397_3\" (\n \"episode_number\" real,\n \"total_episodes\" real,\n \"title\" text,\n \"original_uk_broadcast_by\" text,\n \"original_uk_airdate\" text,\n \"dvd_reference\" text\n);\n\nQuestion: What is episode is \"Bouncy Ball\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_episodes\") FROM \"table1_21344397_3\" WHERE \"title\"='\\\"Bouncy Ball\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21330550_2\" (\n \"date\" text,\n \"time\" text,\n \"acc_team\" text,\n \"big_ten_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: How many locations have #12 Michigan State as the big ten team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"location\") FROM \"table1_21330550_2\" WHERE \"big_ten_team\"='#12 Michigan State';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21330550_2\" (\n \"date\" text,\n \"time\" text,\n \"acc_team\" text,\n \"big_ten_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: Who is the winner when bigten (2-1) is the challenge leader?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"table1_21330550_2\" WHERE \"challenge_leader\"='BigTen (2-1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21330550_2\" (\n \"date\" text,\n \"time\" text,\n \"acc_team\" text,\n \"big_ten_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: Who is the winner in the location of ljvm coliseum \u2022 winston-salem, nc?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"table1_21330550_2\" WHERE \"location\"='LJVM Coliseum \u2022 Winston-Salem, NC';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21330550_2\" (\n \"date\" text,\n \"time\" text,\n \"acc_team\" text,\n \"big_ten_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: What time was the acc team #17 wake forest?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"table1_21330550_2\" WHERE \"acc_team\"='#17 Wake Forest';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21330550_2\" (\n \"date\" text,\n \"time\" text,\n \"acc_team\" text,\n \"big_ten_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: Which location has a time of 9:30pm?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"table1_21330550_2\" WHERE \"time\"='9:30PM';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21330550_2\" (\n \"date\" text,\n \"time\" text,\n \"acc_team\" text,\n \"big_ten_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: How many dates have a big ten team of #10 purdue?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"table1_21330550_2\" WHERE \"big_ten_team\"='#10 Purdue';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province_community\" text,\n \"contestant\" text,\n \"age\" real,\n \"height\" text,\n \"hometown\" text,\n \"geographical_regions\" text\n);\n\nQuestion: Name the hometown for barahona"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"delegates\" WHERE \"province_community\"='Barahona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province_community\" text,\n \"contestant\" text,\n \"age\" real,\n \"height\" text,\n \"hometown\" text,\n \"geographical_regions\" text\n);\n\nQuestion: Name the contestant for villa hermosa"
},
{
"role": "assistant",
"content": "SELECT \"contestant\" FROM \"delegates\" WHERE \"hometown\"='Villa Hermosa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province_community\" text,\n \"contestant\" text,\n \"age\" real,\n \"height\" text,\n \"hometown\" text,\n \"geographical_regions\" text\n);\n\nQuestion: Name the least age for cibao central and santo domingo"
},
{
"role": "assistant",
"content": "SELECT MIN(\"age\") FROM \"delegates\" WHERE \"geographical_regions\"='Cibao Central' AND \"hometown\"='Santo Domingo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"census_division\" text,\n \"area_km\" text,\n \"pop_2011\" real,\n \"pop_2006\" real,\n \"pop_2001\" real,\n \"pop_1996\" real\n);\n\nQuestion: How many different results of the population count in 2001 are there for the census division whose population in 1996 is 880859?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pop_2001\") FROM \"demographics\" WHERE \"pop_1996\"=880859;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"census_division\" text,\n \"area_km\" text,\n \"pop_2011\" real,\n \"pop_2006\" real,\n \"pop_2001\" real,\n \"pop_1996\" real\n);\n\nQuestion: How many people lived in the census division with an area of 15767.99 km2 in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"pop_1996\" FROM \"demographics\" WHERE \"area_km\"='15767.99';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"census_division\" text,\n \"area_km\" text,\n \"pop_2011\" real,\n \"pop_2006\" real,\n \"pop_2001\" real,\n \"pop_1996\" real\n);\n\nQuestion: What is the largest population count in any of the census divisions in 2006?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pop_2006\") FROM \"demographics\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"census_division\" text,\n \"area_km\" text,\n \"pop_2011\" real,\n \"pop_2006\" real,\n \"pop_2001\" real,\n \"pop_1996\" real\n);\n\nQuestion: How many people lived in the census division spread out on 9909.31 km2 in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"pop_1996\" FROM \"demographics\" WHERE \"area_km\"='9909.31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21344397_5\" (\n \"episode_number\" real,\n \"total_episodes\" real,\n \"title\" text,\n \"original_uk_broadcast_by\" text,\n \"original_uk_airdate\" text,\n \"dvd_reference\" text\n);\n\nQuestion: When did \"Granny Pig's Chickens\" first air?"
},
{
"role": "assistant",
"content": "SELECT \"original_uk_airdate\" FROM \"table1_21344397_5\" WHERE \"title\"='\\\"Granny Pig''s Chickens\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21344397_5\" (\n \"episode_number\" real,\n \"total_episodes\" real,\n \"title\" text,\n \"original_uk_broadcast_by\" text,\n \"original_uk_airdate\" text,\n \"dvd_reference\" text\n);\n\nQuestion: How many have the name, \"The Fire Engine\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_episodes\") FROM \"table1_21344397_5\" WHERE \"title\"='\\\"The Fire Engine\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: What is the result of the qf round?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"fixtures_and_results\" WHERE \"round\"='QF';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Which venue has bradford bulls as the opponent on the date of 06/09/2009?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"fixtures_and_results\" WHERE \"opponent\"='Bradford Bulls' AND \"date\"='06/09/2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: Who is the opponent when the attendance is n/a?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"fixtures_and_results\" WHERE \"attendance\"='N/A';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: What is the venue that has 34-18 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"fixtures_and_results\" WHERE \"score\"='34-18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: How many results have 14,381 as the attendance?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"fixtures_and_results\" WHERE \"attendance\"='14,381';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: How many rounds have 6,150 as attendance?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"fixtures_and_results\" WHERE \"attendance\"='6,150';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21369888_4\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text,\n \"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1\" text\n);\n\nQuestion: What is the episode number for \"case two (part 1)\"?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"table1_21369888_4\" WHERE \"title\"='\\\"Case Two (Part 1)\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21369888_4\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text,\n \"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1\" text\n);\n\nQuestion: What is the original air date for the episode viewed by 7.12 million?"
},
{
"role": "assistant",
"content": "SELECT \"originalairdate\" FROM \"table1_21369888_4\" WHERE \"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1\"='7.12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21369888_4\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text,\n \"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1\" text\n);\n\nQuestion: Who directed the episode viewed by 7.35 million?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_21369888_4\" WHERE \"viewing_figures_millions_sourced_by_barb_includes_itv1_hd_and_itv1_1\"='7.35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: How many opponents did they play on 17/05/2009?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponent\") FROM \"fixtures_and_results\" WHERE \"date\"='17/05/2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures_and_results\" (\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"home_away\" text,\n \"venue\" text,\n \"attendance\" text,\n \"date\" text\n);\n\nQuestion: What was the score of round 3?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fixtures_and_results\" WHERE \"round\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"panel_points\" real,\n \"televotes\" real,\n \"televote_points\" real,\n \"score\" real,\n \"placing\" text\n);\n\nQuestion: Name the artist for 7 points"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"artist\") FROM \"final\" WHERE \"televote_points\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"panel_points\" real,\n \"televotes\" real,\n \"televote_points\" real,\n \"score\" real,\n \"placing\" text\n);\n\nQuestion: Name the number of artists for panel points being 5"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"artist\") FROM \"final\" WHERE \"panel_points\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"panel_points\" real,\n \"televotes\" real,\n \"televote_points\" real,\n \"score\" real,\n \"placing\" text\n);\n\nQuestion: Name the total number of televote points for cry on my shoulders"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"televote_points\") FROM \"final\" WHERE \"song\"='Cry on my shoulders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"panel_points\" real,\n \"televotes\" real,\n \"televote_points\" real,\n \"score\" real,\n \"placing\" text\n);\n\nQuestion: Name the score for rebeka dremelj"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final\" WHERE \"artist\"='Rebeka Dremelj';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"song\" text,\n \"artist\" text,\n \"panel_points\" real,\n \"televotes\" real,\n \"televote_points\" real,\n \"score\" real,\n \"placing\" text\n);\n\nQuestion: Name the artist for 1595 televotes"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"final\" WHERE \"televotes\"=1595;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_8_5_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the result of the match on grass in 1955?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"men_s_doubles_8_5_titles_3_runner_ups\" WHERE \"surface\"='Grass' AND \"year\"=1955;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_8_5_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the result of the Australian Championships?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"men_s_doubles_8_5_titles_3_runner_ups\" WHERE \"championship\"='Australian Championships';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.