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 \"dunedin_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Where is the coed school with state authority, a Decile larger than 6 and 26 enrolled?" }, { "role": "assistant", "content": "SELECT \"area\" FROM \"dunedin_city\" WHERE \"authority\"='state' AND \"decile\">6 AND \"gender\"='coed' AND \"roll\"=26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dunedin_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the average roll for Fairfield school?" }, { "role": "assistant", "content": "SELECT AVG(\"roll\") FROM \"dunedin_city\" WHERE \"name\"='fairfield school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dunedin_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which school has a roll larger than 26 and is located in Fairfield?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"dunedin_city\" WHERE \"roll\">26 AND \"area\"='fairfield';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: how many points are there for a Chassis of porsche 718, and a Year smaller than 1964?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"world_championship_results\" WHERE \"chassis\"='porsche 718' AND \"year\"<1964;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: what is the engine that saw 0 points, and a Chassis of porsche 718, in 1961?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"world_championship_results\" WHERE \"points\"=0 AND \"chassis\"='porsche 718' AND \"year\"=1961;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: what is the engine that saw a Chassis of porsche 718, and 0 points, prior to 1964?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"world_championship_results\" WHERE \"chassis\"='porsche 718' AND \"points\"=0 AND \"year\"<1964;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" text\n);\n\nQuestion: Which bronze has a Nation of poland?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"nation\"='poland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" text\n);\n\nQuestion: Which gold has 3 silver and a Total of 5?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"silver\"='3' AND \"total\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" text\n);\n\nQuestion: Which gold has a Bronze of 1, a Rank of 47, and a Nation of spain?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"bronze\"='1' AND \"rank\"='47' AND \"nation\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" text\n);\n\nQuestion: Which nation has a Silver of 1, a Gold of 0, and a Total of 1?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"silver\"='1' AND \"gold\"='0' AND \"total\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" text\n);\n\nQuestion: Which bronze has a Rank of 37?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"rank\"='37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" text\n);\n\nQuestion: Which silver has a Bronze of 1, a Total of 4, and a Nation of slovakia?" }, { "role": "assistant", "content": "SELECT \"silver\" FROM \"medal_table\" WHERE \"bronze\"='1' AND \"total\"='4' AND \"nation\"='slovakia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the Issue Date(s) of Volume:Issue of 32:18-19?" }, { "role": "assistant", "content": "SELECT \"issue_date_s\" FROM \"notes\" WHERE \"volume_issue\"='32:18-19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: Volume:Issue of 32:26-33:5 was how many Weeks on Top?" }, { "role": "assistant", "content": "SELECT \"weeks_on_top\" FROM \"notes\" WHERE \"volume_issue\"='32:26-33:5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What car had the fewest laps with a qual of 138.750?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='138.750';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: How many laps were there for the car with a qual of 138.750?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"indy_500_results\" WHERE \"qual\"='138.750';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: For the car with a qual of 134.288, what was the rank?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"qual\"='134.288';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was the finishing place for 1953?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"year\"='1953';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"class\" (\n \"name\" text,\n \"pennant\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: Tell me the name for commissioned of 30 august 1941 and laid down of 22 september 1939" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"class\" WHERE \"laid_down\"='22 september 1939' AND \"commissioned\"='30 august 1941';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score when there was a Loss of birkbeck (0\u20133)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='birkbeck (0\u20133)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bioinformatics\" (\n \"application\" text,\n \"expected_speed_up\" text,\n \"gpu\" text,\n \"multi_gpu_support\" text,\n \"release_status\" text\n);\n\nQuestion: Which GPU has the cushaw application?" }, { "role": "assistant", "content": "SELECT \"gpu\" FROM \"bioinformatics\" WHERE \"application\"='cushaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bioinformatics\" (\n \"application\" text,\n \"expected_speed_up\" text,\n \"gpu\" text,\n \"multi_gpu_support\" text,\n \"release_status\" text\n);\n\nQuestion: What is the expected speed up of the gpu-hmmer application?" }, { "role": "assistant", "content": "SELECT \"expected_speed_up\" FROM \"bioinformatics\" WHERE \"application\"='gpu-hmmer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1999\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the host team at the game at the Cleveland Browns Stadium?" }, { "role": "assistant", "content": "SELECT \"host_team\" FROM \"1999\" WHERE \"stadium\"='cleveland browns stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1999\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score when the Buffalo Bills were the visiting team?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"1999\" WHERE \"visiting_team\"='buffalo bills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1999\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score when the Denver Broncos were the visiting team?" }, { "role": "assistant", "content": "SELECT \"final_score\" FROM \"1999\" WHERE \"visiting_team\"='denver broncos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1999\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the date that a game at the Alltel Stadium had a final score of 6-20?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1999\" WHERE \"stadium\"='alltel stadium' AND \"final_score\"='6-20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" real,\n \"champion\" text,\n \"motorcycle\" text,\n \"wins\" real,\n \"2nd_pl\" real,\n \"3rd_pl\" real,\n \"team\" text\n);\n\nQuestion: what is the average season when results is less than 2 times in 2nd and more than 6 times in 3rd?" }, { "role": "assistant", "content": "SELECT AVG(\"season\") FROM \"by_season\" WHERE \"2nd_pl\"<2 AND \"3rd_pl\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" real,\n \"champion\" text,\n \"motorcycle\" text,\n \"wins\" real,\n \"2nd_pl\" real,\n \"3rd_pl\" real,\n \"team\" text\n);\n\nQuestion: How many times was the motorcycle ducati 916 2nd place when wins is less than 7?" }, { "role": "assistant", "content": "SELECT SUM(\"2nd_pl\") FROM \"by_season\" WHERE \"motorcycle\"='ducati 916' AND \"wins\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" real,\n \"champion\" text,\n \"motorcycle\" text,\n \"wins\" real,\n \"2nd_pl\" real,\n \"3rd_pl\" real,\n \"team\" text\n);\n\nQuestion: Who is the champion when the motorcycle is ducati 916 and 2nd place is less than 5?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"by_season\" WHERE \"motorcycle\"='ducati 916' AND \"2nd_pl\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What Catalog has a label of Alfa records and a date of November 21, 1980?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"label\"='alfa records' AND \"date\"='november 21, 1980';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What catalog has a format of ED remaster CD and a date of December 19, 2001?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='ed remaster cd' AND \"date\"='december 19, 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What Date has a label of alfa records?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='alfa records';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What region has the label of alfa records and the date of January 23, 1987?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"label\"='alfa records' AND \"date\"='january 23, 1987';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date has the format of CD and catalog of alca-274?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='cd' AND \"catalog\"='alca-274';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date has the format of cd?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='cd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"otorohanga_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the Decile number for St Mary's Catholic School?" }, { "role": "assistant", "content": "SELECT \"decile\" FROM \"otorohanga_district\" WHERE \"name\"='st mary''s catholic school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"otorohanga_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which Authority is set for Hauturu School?" }, { "role": "assistant", "content": "SELECT \"authority\" FROM \"otorohanga_district\" WHERE \"name\"='hauturu school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"otorohanga_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What School is in the kio kio area?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"otorohanga_district\" WHERE \"area\"='kio kio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_tt_results\" (\n \"race\" text,\n \"position\" text,\n \"time_hh_mm_ss\" text,\n \"speed_mph\" text,\n \"replica\" text\n);\n\nQuestion: What race is in the 5th position?" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"2012_tt_results\" WHERE \"position\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_tt_results\" (\n \"race\" text,\n \"position\" text,\n \"time_hh_mm_ss\" text,\n \"speed_mph\" text,\n \"replica\" text\n);\n\nQuestion: What Replica has a race of supersport race 1?" }, { "role": "assistant", "content": "SELECT \"replica\" FROM \"2012_tt_results\" WHERE \"race\"='supersport race 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_tt_results\" (\n \"race\" text,\n \"position\" text,\n \"time_hh_mm_ss\" text,\n \"speed_mph\" text,\n \"replica\" text\n);\n\nQuestion: What replica has the 5th position?" }, { "role": "assistant", "content": "SELECT \"replica\" FROM \"2012_tt_results\" WHERE \"position\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"32_bit_systems\" (\n \"model\" text,\n \"floating_point\" text,\n \"decimal\" text,\n \"byte_string\" text,\n \"memory_map\" text,\n \"max_memory_kwords\" real\n);\n\nQuestion: When a Sigma 7 has a standard byte string, what is the value for the decimal?" }, { "role": "assistant", "content": "SELECT \"decimal\" FROM \"32_bit_systems\" WHERE \"byte_string\"='standard' AND \"model\"='sigma 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"32_bit_systems\" (\n \"model\" text,\n \"floating_point\" text,\n \"decimal\" text,\n \"byte_string\" text,\n \"memory_map\" text,\n \"max_memory_kwords\" real\n);\n\nQuestion: What is the value for the byte string when the memory map, decimal, and floating points are all standard and the max memory is smaller than 512?" }, { "role": "assistant", "content": "SELECT \"byte_string\" FROM \"32_bit_systems\" WHERE \"memory_map\"='standard' AND \"decimal\"='standard' AND \"floating_point\"='standard' AND \"max_memory_kwords\"<512;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"32_bit_systems\" (\n \"model\" text,\n \"floating_point\" text,\n \"decimal\" text,\n \"byte_string\" text,\n \"memory_map\" text,\n \"max_memory_kwords\" real\n);\n\nQuestion: What model has both a standard byte string and floating-point?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"32_bit_systems\" WHERE \"byte_string\"='standard' AND \"floating_point\"='standard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"32_bit_systems\" (\n \"model\" text,\n \"floating_point\" text,\n \"decimal\" text,\n \"byte_string\" text,\n \"memory_map\" text,\n \"max_memory_kwords\" real\n);\n\nQuestion: On a Sigma 9 with a standard byte string and more than 128 max memory, what is the value of the memory map?" }, { "role": "assistant", "content": "SELECT \"memory_map\" FROM \"32_bit_systems\" WHERE \"byte_string\"='standard' AND \"max_memory_kwords\">128 AND \"model\"='sigma 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"32_bit_systems\" (\n \"model\" text,\n \"floating_point\" text,\n \"decimal\" text,\n \"byte_string\" text,\n \"memory_map\" text,\n \"max_memory_kwords\" real\n);\n\nQuestion: What is the decimal value when the memory map and byte string are standard, and the max memory is 512?" }, { "role": "assistant", "content": "SELECT \"decimal\" FROM \"32_bit_systems\" WHERE \"byte_string\"='standard' AND \"memory_map\"='standard' AND \"max_memory_kwords\"=512;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who was the co-driver in the DNF position in the GT1 class?" }, { "role": "assistant", "content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='dnf' AND \"class\"='gt1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which co-driver was part of team Martini Lancia earlier than 1986?" }, { "role": "assistant", "content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\"<1986 AND \"team\"='martini lancia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: The Le Mans Porsche team Joest Racing is in which class?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='le mans porsche team joest racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"switchers_s_series\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Name the build date for total produced of 146" }, { "role": "assistant", "content": "SELECT \"build_date\" FROM \"switchers_s_series\" WHERE \"total_produced\"=146;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"switchers_s_series\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Name the model for specification of dl-066" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"switchers_s_series\" WHERE \"specification\"='dl-066';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"switchers_s_series\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Name the power output for model of s-13" }, { "role": "assistant", "content": "SELECT \"power_output\" FROM \"switchers_s_series\" WHERE \"model\"='s-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" real,\n \"worst_dancer_s\" text,\n \"worst_score\" real\n);\n\nQuestion: What's the worst score for the worst dancer(s) john barnes, with a best score of 36?" }, { "role": "assistant", "content": "SELECT \"worst_score\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"best_score\"=36 AND \"worst_dancer_s\"='john barnes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" real,\n \"worst_dancer_s\" text,\n \"worst_score\" real\n);\n\nQuestion: What's the worst dance of jive dancer(s)?" }, { "role": "assistant", "content": "SELECT \"worst_dancer_s\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"dance\"='jive';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" real,\n \"worst_dancer_s\" text,\n \"worst_score\" real\n);\n\nQuestion: What's the best score, with the worst dancer(s) gethin jones/kenny logan?" }, { "role": "assistant", "content": "SELECT \"best_score\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"worst_dancer_s\"='gethin jones/kenny logan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer_s\" text,\n \"best_score\" real,\n \"worst_dancer_s\" text,\n \"worst_score\" real\n);\n\nQuestion: What's the best average score with a bad score of 15?" }, { "role": "assistant", "content": "SELECT AVG(\"best_score\") FROM \"highest_and_lowest_scoring_performances\" WHERE \"worst_score\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the name of the opponent that has a record of 66-69?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='66-69';" } ]
[ { "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\" text\n);\n\nQuestion: What was Olin Dutra's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='olin dutra';" } ]
[ { "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\" text\n);\n\nQuestion: What was Craig Wood's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='craig wood';" } ]
[ { "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\" text\n);\n\nQuestion: What was Paul Runyan's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='paul runyan';" } ]
[ { "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\" text\n);\n\nQuestion: What country has a To par of e?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_round\" WHERE \"to_par\"='e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"june_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: What position for the player from villa park high school?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"june_draft\" WHERE \"school\"='villa park high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of medals by the Czech republic?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"medal_table\" WHERE \"nation\"='czech republic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals does the country ranked higher than 2 with more than 8 bronze have?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"rank\"<2 AND \"bronze\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest rank a country with less than 3 gold, more than 2 silver, and less than 5 total medals has?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"medal_table\" WHERE \"gold\"<3 AND \"silver\">2 AND \"total\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When is the record 5-4?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='5-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"100_million_to_119_million_records\" (\n \"artist\" text,\n \"country_of_origin\" text,\n \"period_active\" text,\n \"release_year_of_first_charted_record\" real,\n \"genre\" text,\n \"claimed_sales\" text\n);\n\nQuestion: What is the Genre when the Artist is Prince?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"100_million_to_119_million_records\" WHERE \"artist\"='prince';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"100_million_to_119_million_records\" (\n \"artist\" text,\n \"country_of_origin\" text,\n \"period_active\" text,\n \"release_year_of_first_charted_record\" real,\n \"genre\" text,\n \"claimed_sales\" text\n);\n\nQuestion: What is the Genre, when the Release-year of first charted record is 1968, and when the Country of origin is United States?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"100_million_to_119_million_records\" WHERE \"release_year_of_first_charted_record\"=1968 AND \"country_of_origin\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numbering\" (\n \"year\" real,\n \"rr_class\" text,\n \"rr_nos\" text,\n \"builder\" text,\n \"builder_nos\" text,\n \"gwr_br_nos\" text\n);\n\nQuestion: Name the builder numbers with RR class of a1 and year less than 1916" }, { "role": "assistant", "content": "SELECT \"builder_nos\" FROM \"numbering\" WHERE \"rr_class\"='a1' AND \"year\"<1916;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numbering\" (\n \"year\" real,\n \"rr_class\" text,\n \"rr_nos\" text,\n \"builder\" text,\n \"builder_nos\" text,\n \"gwr_br_nos\" text\n);\n\nQuestion: Name the RR numbers of hudswell clarke and years before 1914" }, { "role": "assistant", "content": "SELECT \"rr_nos\" FROM \"numbering\" WHERE \"builder\"='hudswell clarke' AND \"year\"<1914;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_sunday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"hole\" text\n);\n\nQuestion: What is the To par has the presence of Vijay Singh?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_round_sunday\" WHERE \"player\"='vijay singh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" text\n);\n\nQuestion: How many laps did Dick Rathmann complete when he ranked 14?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"indy_500_results\" WHERE \"rank\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" text\n);\n\nQuestion: What was Dick Rathmann's Finish the year he Qualed at 130.928?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"qual\"='130.928';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_axle_units\" (\n \"model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: What is the average total produced when the prime mover is 12-251c?" }, { "role": "assistant", "content": "SELECT AVG(\"total_produced\") FROM \"4_axle_units\" WHERE \"prime_mover\"='12-251c';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_axle_units\" (\n \"model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: What is the build date when total produced is 2?" }, { "role": "assistant", "content": "SELECT \"build_date\" FROM \"4_axle_units\" WHERE \"total_produced\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_axle_units\" (\n \"model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: What is the smallest total produced with a model of M-420?" }, { "role": "assistant", "content": "SELECT MIN(\"total_produced\") FROM \"4_axle_units\" WHERE \"model\"='m-420';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_axle_units\" (\n \"model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: What is the prime mover for a build date in 1975?" }, { "role": "assistant", "content": "SELECT \"prime_mover\" FROM \"4_axle_units\" WHERE \"build_date\"='1975';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_axle_units\" (\n \"model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: What model has a total produced more than 5 and a prime move of 12-251c?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"4_axle_units\" WHERE \"total_produced\">5 AND \"prime_mover\"='12-251c';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the home Detroit game with a decision of Joseph and a record of 27\u201313\u20135\u20132?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"january\" WHERE \"decision\"='joseph' AND \"home\"='detroit' AND \"record\"='27\u201313\u20135\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the home Dallas game that had a decision of Legace?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"decision\"='legace' AND \"home\"='dallas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game that had a record of 26\u201313\u20134\u20132 and a decision of Joseph?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"decision\"='joseph' AND \"record\"='26\u201313\u20134\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visiting team when the record was 28\u201314\u20136\u20132?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"january\" WHERE \"record\"='28\u201314\u20136\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_international_formula_3000_resu\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What are the lowest points that have a Mugen V8 engine and a Reynard 91D chassis?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_international_formula_3000_resu\" WHERE \"engine\"='mugen v8' AND \"chassis\"='reynard 91d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_international_formula_3000_resu\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What are the highest points that have a Mugen V8 engine and happened in 1991?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_international_formula_3000_resu\" WHERE \"engine\"='mugen v8' AND \"year\"=1991;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many years did John Player Lotus used Cosworth v8?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"complete_formula_one_results\" WHERE \"engine\"='cosworth v8' AND \"entrant\"='john player lotus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Who used Eurobrun er189b after 1989?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"year\">1989 AND \"chassis\"='eurobrun er189b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Who used Ford v8 and Jordan 191 after 1990 and got 8 points?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"year\">1990 AND \"engine\"='ford v8' AND \"points\"=8 AND \"chassis\"='jordan 191';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opening_day_starting_lineups\" (\n \"year\" real,\n \"catcher\" text,\n \"first_baseman\" text,\n \"second_baseman\" text,\n \"shortstop\" text,\n \"third_baseman\" text,\n \"rightfielder\" text,\n \"centerfielder\" text,\n \"leftfielder\" text,\n \"starting_pitcher\" text\n);\n\nQuestion: What is the name of the Leftfielder when Davey Lopes was the Second Baseman and first baseman was steve garvey, Shortstop of bill russell eariler than 1977?" }, { "role": "assistant", "content": "SELECT \"leftfielder\" FROM \"opening_day_starting_lineups\" WHERE \"second_baseman\"='davey lopes' AND \"first_baseman\"='steve garvey' AND \"shortstop\"='bill russell' AND \"year\">1977;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opening_day_starting_lineups\" (\n \"year\" real,\n \"catcher\" text,\n \"first_baseman\" text,\n \"second_baseman\" text,\n \"shortstop\" text,\n \"third_baseman\" text,\n \"rightfielder\" text,\n \"centerfielder\" text,\n \"leftfielder\" text,\n \"starting_pitcher\" text\n);\n\nQuestion: What is the name of the shortstop when the Catcher was johnny roseboro, and a Third Baseman of jim lefebvre, and a Second Baseman of nate oliver?" }, { "role": "assistant", "content": "SELECT \"shortstop\" FROM \"opening_day_starting_lineups\" WHERE \"catcher\"='johnny roseboro' AND \"third_baseman\"='jim lefebvre' AND \"second_baseman\"='nate oliver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opening_day_starting_lineups\" (\n \"year\" real,\n \"catcher\" text,\n \"first_baseman\" text,\n \"second_baseman\" text,\n \"shortstop\" text,\n \"third_baseman\" text,\n \"rightfielder\" text,\n \"centerfielder\" text,\n \"leftfielder\" text,\n \"starting_pitcher\" text\n);\n\nQuestion: Who was the First Baseman when the Shortstop was zoilo versalles?" }, { "role": "assistant", "content": "SELECT \"first_baseman\" FROM \"opening_day_starting_lineups\" WHERE \"shortstop\"='zoilo versalles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opening_day_starting_lineups\" (\n \"year\" real,\n \"catcher\" text,\n \"first_baseman\" text,\n \"second_baseman\" text,\n \"shortstop\" text,\n \"third_baseman\" text,\n \"rightfielder\" text,\n \"centerfielder\" text,\n \"leftfielder\" text,\n \"starting_pitcher\" text\n);\n\nQuestion: What is the name of the Leftfielder when the Shortstop was bill russell, and the Second Baseman was steve sax in 1983?" }, { "role": "assistant", "content": "SELECT \"leftfielder\" FROM \"opening_day_starting_lineups\" WHERE \"shortstop\"='bill russell' AND \"second_baseman\"='steve sax' AND \"year\"=1983;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the earliest year with less than 3 points and Parmalat Forti Ford was the entrant?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"complete_formula_one_results\" WHERE \"points\"<3 AND \"entrant\"='parmalat forti ford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average Points when equipe ligier gauloises blondes is the entrant?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='equipe ligier gauloises blondes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the smallest amount of points for parmalat forti ford entrant later than 1995?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='parmalat forti ford' AND \"year\">1995;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the company that made the chassis for the entrant danka arrows yamaha?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"entrant\"='danka arrows yamaha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did Ray Graves attend?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='ray graves';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What number pick was Bill Athey?" }, { "role": "assistant", "content": "SELECT \"pick_num\" FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='bill athey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is John Cole's overall pick number?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='john cole';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sligo_leitrim_and_northern_counties_rail\" (\n \"class\" text,\n \"type\" text,\n \"names\" text,\n \"quantity_made\" text,\n \"manufacturer\" text,\n \"date_made\" text\n);\n\nQuestion: What is the date of the locomotive with a Waterford class?" }, { "role": "assistant", "content": "SELECT \"date_made\" FROM \"sligo_leitrim_and_northern_counties_rail\" WHERE \"class\"='waterford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sligo_leitrim_and_northern_counties_rail\" (\n \"class\" text,\n \"type\" text,\n \"names\" text,\n \"quantity_made\" text,\n \"manufacturer\" text,\n \"date_made\" text\n);\n\nQuestion: What is the date of the locomotive named Blacklion Glencar?" }, { "role": "assistant", "content": "SELECT \"date_made\" FROM \"sligo_leitrim_and_northern_counties_rail\" WHERE \"names\"='blacklion glencar';" } ]