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 \"national_team_matches\" (\n \"date\" text,\n \"location\" text,\n \"opponenent\" text,\n \"result\" text,\n \"match_type\" text\n);\n\nQuestion: Where was the opponent Germany?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"national_team_matches\" WHERE \"opponenent\"='germany';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team_matches\" (\n \"date\" text,\n \"location\" text,\n \"opponenent\" text,\n \"result\" text,\n \"match_type\" text\n);\n\nQuestion: Who was the opponent when the result was 2-2 (draw)?"
},
{
"role": "assistant",
"content": "SELECT \"opponenent\" FROM \"national_team_matches\" WHERE \"result\"='2-2 (draw)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team_matches\" (\n \"date\" text,\n \"location\" text,\n \"opponenent\" text,\n \"result\" text,\n \"match_type\" text\n);\n\nQuestion: What was the match type in Budapest where the opponent was Luxembourg?"
},
{
"role": "assistant",
"content": "SELECT \"match_type\" FROM \"national_team_matches\" WHERE \"location\"='budapest' AND \"opponenent\"='luxembourg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which player has the score 72-67-69=208?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='72-67-69=208';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who has the par score of 70-76-68-214?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"score\"='70-76-68-214';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country has the score 70-76-68-214?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='70-76-68-214';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: when was the first performance for the ballet with peter mazurowski in the final cast?"
},
{
"role": "assistant",
"content": "SELECT \"first_performance\" FROM \"billy_elliot\" WHERE \"style\"='ballet' AND \"status\"='final cast' AND \"name\"='peter mazurowski';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: who had the first performance on 3 july 2011?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"billy_elliot\" WHERE \"first_performance\"='3 july 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: who had a last performance of 3 july 2011?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"billy_elliot\" WHERE \"last_performance\"='3 july 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: what's the status in the style of ballet/ gymnastics?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"billy_elliot\" WHERE \"style\"='ballet/ gymnastics';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: what's the name with final cast status and first performance on 12 november 2011?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"billy_elliot\" WHERE \"status\"='final cast' AND \"first_performance\"='12 november 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: what last performance has past status, ballet as style and tommy batchelor?"
},
{
"role": "assistant",
"content": "SELECT \"last_performance\" FROM \"billy_elliot\" WHERE \"status\"='past' AND \"style\"='ballet' AND \"name\"='tommy batchelor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: How many goals was by Rix from Eng who started before 2005 in the youth system?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals\") FROM \"squad_information\" WHERE \"nat\"='eng' AND \"transfer_fee\"='youth system' AND \"since\"<2005 AND \"name\"='rix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Where is Rix from?"
},
{
"role": "assistant",
"content": "SELECT \"nat\" FROM \"squad_information\" WHERE \"name\"='rix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cab_units_fa_fp_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: What is the specification of the locomotives with a total produced more than 19 and a model of fb-1?"
},
{
"role": "assistant",
"content": "SELECT \"specification\" FROM \"cab_units_fa_fp_series\" WHERE \"total_produced\">19 AND \"model\"='fb-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cab_units_fa_fp_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: What is the build date of the locomotives with a total produced less than 45 and a fb-2 model?"
},
{
"role": "assistant",
"content": "SELECT \"build_date\" FROM \"cab_units_fa_fp_series\" WHERE \"total_produced\"<45 AND \"model\"='fb-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cab_units_fa_fp_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: What is the prime mover of the locomotive with a fa-2 model?"
},
{
"role": "assistant",
"content": "SELECT \"prime_mover\" FROM \"cab_units_fa_fp_series\" WHERE \"model\"='fa-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cab_units_fa_fp_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: What is the build date of the locomotive with a fa-2 model?"
},
{
"role": "assistant",
"content": "SELECT \"build_date\" FROM \"cab_units_fa_fp_series\" WHERE \"model\"='fa-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_transmitters\" (\n \"region_served\" text,\n \"city\" text,\n \"channels_analog_digital\" text,\n \"first_air_date\" text,\n \"erp_analog_digital\" text,\n \"haat_analog_digital_1\" text,\n \"transmitter_location\" text\n);\n\nQuestion: What region has a transmitter located at Mount Sugarloaf?"
},
{
"role": "assistant",
"content": "SELECT \"region_served\" FROM \"main_transmitters\" WHERE \"transmitter_location\"='mount sugarloaf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"season\" text,\n \"prelim\" text,\n \"1st_round\" text,\n \"2nd_round\" text,\n \"3rd_round\" text,\n \"finals\" text\n);\n\nQuestion: Name the 3rd round for 1st eound of out of playoffs"
},
{
"role": "assistant",
"content": "SELECT \"3rd_round\" FROM \"playoffs\" WHERE \"1st_round\"='out of playoffs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"season\" text,\n \"prelim\" text,\n \"1st_round\" text,\n \"2nd_round\" text,\n \"3rd_round\" text,\n \"finals\" text\n);\n\nQuestion: Name the finals for prelim of out of playoffs"
},
{
"role": "assistant",
"content": "SELECT \"finals\" FROM \"playoffs\" WHERE \"prelim\"='out of playoffs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"season\" text,\n \"prelim\" text,\n \"1st_round\" text,\n \"2nd_round\" text,\n \"3rd_round\" text,\n \"finals\" text\n);\n\nQuestion: Name the 2nd round for 1st round of l, 1\u20133, sjnb"
},
{
"role": "assistant",
"content": "SELECT \"2nd_round\" FROM \"playoffs\" WHERE \"1st_round\"='l, 1\u20133, sjnb';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_filmography\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"language\" text,\n \"music_director\" text\n);\n\nQuestion: Who is the musical director of the film Vettaiyaadu vilaiyaadu?"
},
{
"role": "assistant",
"content": "SELECT \"music_director\" FROM \"notable_filmography\" WHERE \"film\"='vettaiyaadu vilaiyaadu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_filmography\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"language\" text,\n \"music_director\" text\n);\n\nQuestion: What is the 2007 film in Hindi with a music director Shantanu moitra?"
},
{
"role": "assistant",
"content": "SELECT \"film\" FROM \"notable_filmography\" WHERE \"year\"=2007 AND \"language\"='hindi' AND \"music_director\"='shantanu moitra';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winningest_coaches_by_wins\" (\n \"coach\" text,\n \"team\" text,\n \"wins\" real,\n \"loss\" real,\n \"pct\" real,\n \"pts\" real\n);\n\nQuestion: What is the number of losses that coach John Kowalski has with a PTS smaller than 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"loss\") FROM \"winningest_coaches_by_wins\" WHERE \"coach\"='john kowalski' AND \"pts\"<9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winningest_coaches_by_wins\" (\n \"coach\" text,\n \"team\" text,\n \"wins\" real,\n \"loss\" real,\n \"pct\" real,\n \"pts\" real\n);\n\nQuestion: What is the average PCT when it has a PTS smaller than 9 a wins larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pct\") FROM \"winningest_coaches_by_wins\" WHERE \"pts\"<9 AND \"wins\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winningest_coaches_by_wins\" (\n \"coach\" text,\n \"team\" text,\n \"wins\" real,\n \"loss\" real,\n \"pct\" real,\n \"pts\" real\n);\n\nQuestion: What is the sum of PTS when there is a PCT smaller than 0.1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pts\") FROM \"winningest_coaches_by_wins\" WHERE \"pct\"<0.1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winningest_coaches_by_wins\" (\n \"coach\" text,\n \"team\" text,\n \"wins\" real,\n \"loss\" real,\n \"pct\" real,\n \"pts\" real\n);\n\nQuestion: What coach has a PCT larger than 0.1, PTS larger than 9 and a loss of 19?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"winningest_coaches_by_wins\" WHERE \"pct\">0.1 AND \"pts\">9 AND \"loss\"=19;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's the name of spain rank greater than 2?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"semifinal_2\" WHERE \"rank\">2 AND \"nationality\"='spain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Spain had what time with lanes smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_2\" WHERE \"lane\"<4 AND \"nationality\"='spain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's the smallest rank of noriko inada?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='noriko inada';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ppl_2004_final_standings\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many total losses have teams that played more than 30 games?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"ppl_2004_final_standings\" WHERE \"played\">30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the number of the rank when the time is 2:15.98, in a lane larger than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"semifinal_2\" WHERE \"time\"='2:15.98' AND \"lane\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the number of the rank for the name of Chen Yan in a lane less than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='chen yan' AND \"lane\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the smallest lane for rank 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lane\") FROM \"semifinal_2\" WHERE \"rank\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the total for a league cup less than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"league_cup\") FROM \"goals\" WHERE \"total\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goals\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the FA Cup that has a league less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"fa_cup\") FROM \"goals\" WHERE \"league\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"name\" text,\n \"hanzi\" text,\n \"area_km\" real,\n \"population\" real,\n \"villages\" real\n);\n\nQuestion: Which town has the most villages with the hanzi \u5357\u6d41\u4e61 and a population larger than 24,802?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"villages\") FROM \"administrative_divisions\" WHERE \"hanzi\"='\u5357\u6d41\u4e61' AND \"population\">'24,802';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text\n);\n\nQuestion: What position did lap 296 come in?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"laps\"=296;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many games did the Club that has a try bonus of 4 and 391 points against play ?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2008_2009_table\" WHERE \"try_bonus\"='4' AND \"points_against\"='391';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many points against did Carmarthen Athletic RFC have when they played 22 games ?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2008_2009_table\" WHERE \"played\"='22' AND \"club\"='carmarthen athletic rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: Which club lost 10 games ?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2008_2009_table\" WHERE \"lost\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many points for did the club that had 77 tries for have ?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2008_2009_table\" WHERE \"tries_for\"='77';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: Which club has a try bonus of 2 ?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2008_2009_table\" WHERE \"try_bonus\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the most attendance for october 11"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"regular_season\" WHERE \"date\"='october 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the visitor for october 19"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"date\"='october 19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dragon_laws_television_films\" (\n \"year\" real,\n \"series_title\" text,\n \"chinese_title\" text,\n \"role\" text,\n \"channel\" text\n);\n\nQuestion: The highest year for the series titled dragon laws ii: kidnapped is what?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"dragon_laws_television_films\" WHERE \"series_title\"='dragon laws ii: kidnapped';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dragon_laws_television_films\" (\n \"year\" real,\n \"series_title\" text,\n \"chinese_title\" text,\n \"role\" text,\n \"channel\" text\n);\n\nQuestion: The series titled dragon laws i: the undercover has what role?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"dragon_laws_television_films\" WHERE \"series_title\"='dragon laws i: the undercover';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"paralympic_women\" (\n \"classification\" text,\n \"fastest_time_s\" real,\n \"athlete\" text,\n \"country\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Which athlete has the fastest time of 15.82?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"paralympic_women\" WHERE \"fastest_time_s\"=15.82;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of years that an entrant had more than 0 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"complete_world_championship_formula_one_\" WHERE \"points\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of years for brm straight-4"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='brm straight-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of points for chassis of bmw t269 (f2)"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='bmw t269 (f2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_through_the_2011_12_season\" (\n \"seasons\" real,\n \"team\" text,\n \"ch_wins\" real,\n \"promotions\" real,\n \"relegations\" real\n);\n\nQuestion: Whats the highest Promotions that has a Team of Pallacanestro Messina, along with Relegations larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"promotions\") FROM \"appearances_through_the_2011_12_season\" WHERE \"team\"='pallacanestro messina' AND \"relegations\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"chassis\" text,\n \"engine_s\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What are the lowest points with a Chassis of zakspeed 841, and a Year smaller than 1985?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"chassis\"='zakspeed 841' AND \"year\"<1985;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"chassis\" text,\n \"engine_s\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest year with tyres in g and less than 0 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"complete_world_championship_formula_one_\" WHERE \"tyres\"='g' AND \"points\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"chassis\" text,\n \"engine_s\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: Which year has an Engine(s) of yamaha v8?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"complete_world_championship_formula_one_\" WHERE \"engine_s\"='yamaha v8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"chassis\" text,\n \"engine_s\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What are the average points with a Chassis of zakspeed 881?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"chassis\"='zakspeed 881';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minor_sports_teams\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"championships_years\" text\n);\n\nQuestion: Which League has a Venue of martin luther king, jr. recreation center?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"minor_sports_teams\" WHERE \"venue\"='martin luther king, jr. recreation center';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minor_sports_teams\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"championships_years\" text\n);\n\nQuestion: Which Championships (Years) have a League of milb, florida state league, and a Venue of ed smith stadium?"
},
{
"role": "assistant",
"content": "SELECT \"championships_years\" FROM \"minor_sports_teams\" WHERE \"league\"='milb, florida state league' AND \"venue\"='ed smith stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minor_sports_teams\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"championships_years\" text\n);\n\nQuestion: Which Sport has a League of continental basketball league, and a Venue of avalon middle school?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"minor_sports_teams\" WHERE \"league\"='continental basketball league' AND \"venue\"='avalon middle school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minor_sports_teams\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"championships_years\" text\n);\n\nQuestion: Which Venue has a Sport of baseball, Championships (Years) of 0, a League of milb, florida state league, and a Club of jupiter hammerheads?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"minor_sports_teams\" WHERE \"sport\"='baseball' AND \"championships_years\"='0' AND \"league\"='milb, florida state league' AND \"club\"='jupiter hammerheads';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minor_sports_teams\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"championships_years\" text\n);\n\nQuestion: Which club has a League of american basketball association, and a Venue of tba?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"minor_sports_teams\" WHERE \"league\"='american basketball association' AND \"venue\"='tba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hurunui_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 area has Years of 1\u20138, a Decile smaller than 7, and a Name of waikari school?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"hurunui_district\" WHERE \"years\"='1\u20138' AND \"decile\"<7 AND \"name\"='waikari school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hurunui_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 average decile with Years of 1\u20138, and an Area of waipara?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"decile\") FROM \"hurunui_district\" WHERE \"years\"='1\u20138' AND \"area\"='waipara';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hurunui_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 area has Years of 1\u20138, and a Name of broomfield school?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"hurunui_district\" WHERE \"years\"='1\u20138' AND \"name\"='broomfield school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hurunui_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 smallest roll with a Decile larger than 6, and a Name of broomfield school?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"roll\") FROM \"hurunui_district\" WHERE \"decile\">6 AND \"name\"='broomfield school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hurunui_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 name has a Roll of 270?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"hurunui_district\" WHERE \"roll\"=270;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1_2007_2009\" (\n \"prod_no\" text,\n \"title\" text,\n \"written_by\" text,\n \"directed_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who directed the episode written by Dan Serafin and aired on July 23, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"season_1_2007_2009\" WHERE \"written_by\"='dan serafin' AND \"original_airdate\"='july 23, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1_2007_2009\" (\n \"prod_no\" text,\n \"title\" text,\n \"written_by\" text,\n \"directed_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the title of the episode originally aired on February 2, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_1_2007_2009\" WHERE \"original_airdate\"='february 2, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: How much money did James Seddon request?"
},
{
"role": "assistant",
"content": "SELECT \"money_requested\" FROM \"series_3\" WHERE \"entrepreneur_s\"='james seddon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: Which Entrepreneur(s) first aired on 24 August 2006?"
},
{
"role": "assistant",
"content": "SELECT \"entrepreneur_s\" FROM \"series_3\" WHERE \"first_aired\"='24 august 2006';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: Which Entrepreneur(s) have mixalbum?"
},
{
"role": "assistant",
"content": "SELECT \"entrepreneur_s\" FROM \"series_3\" WHERE \"company_or_product_name\"='mixalbum';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: How much money did Ian Chamings request?"
},
{
"role": "assistant",
"content": "SELECT \"money_requested\" FROM \"series_3\" WHERE \"entrepreneur_s\"='ian chamings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: Which Investing Dragon(s) requested 100,000 in money and has autosafe?"
},
{
"role": "assistant",
"content": "SELECT \"investing_dragon_s\" FROM \"series_3\" WHERE \"money_requested\"='100,000' AND \"company_or_product_name\"='autosafe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed\" (\n \"name\" text,\n \"height_of_bridge_structure\" text,\n \"longest_span\" text,\n \"type\" text,\n \"opened\" real,\n \"location\" text\n);\n\nQuestion: How tall is the Anqing Bridge which opened prior to 2011?"
},
{
"role": "assistant",
"content": "SELECT \"height_of_bridge_structure\" FROM \"completed\" WHERE \"opened\"<2011 AND \"name\"='anqing bridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed\" (\n \"name\" text,\n \"height_of_bridge_structure\" text,\n \"longest_span\" text,\n \"type\" text,\n \"opened\" real,\n \"location\" text\n);\n\nQuestion: Where did the cable-stayed Badong Bridge open in 2005?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"completed\" WHERE \"type\"='cable-stayed' AND \"opened\"=2005 AND \"name\"='badong bridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_silpathorn_award_winners\" (\n \"year\" real,\n \"literature\" text,\n \"music\" text,\n \"film\" text,\n \"performing_arts\" text\n);\n\nQuestion: Name the average year for janaprakal chandruang"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"list_of_silpathorn_award_winners\" WHERE \"performing_arts\"='janaprakal chandruang';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_silpathorn_award_winners\" (\n \"year\" real,\n \"literature\" text,\n \"music\" text,\n \"film\" text,\n \"performing_arts\" text\n);\n\nQuestion: Name the literature for pradit prasarttong"
},
{
"role": "assistant",
"content": "SELECT \"literature\" FROM \"list_of_silpathorn_award_winners\" WHERE \"performing_arts\"='pradit prasarttong';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_event_winners\" (\n \"year\" real,\n \"winner\" text,\n \"winning_hand\" text,\n \"prize_money\" text,\n \"entrants\" real,\n \"runner_up\" text,\n \"losing_hand\" text\n);\n\nQuestion: What was the first year Fabrice Soulier was a runner-up?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"main_event_winners\" WHERE \"runner_up\"='fabrice soulier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_event_winners\" (\n \"year\" real,\n \"winner\" text,\n \"winning_hand\" text,\n \"prize_money\" text,\n \"entrants\" real,\n \"runner_up\" text,\n \"losing_hand\" text\n);\n\nQuestion: How many entrants were there in 2011?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"entrants\") FROM \"main_event_winners\" WHERE \"year\"=2011;"
}
]
|
[
{
"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 rank of Bobby Grim when he finished 1059 laps?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"laps\"=1059;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_boxing_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"type\" text,\n \"rd_time\" text,\n \"date\" text\n);\n\nQuestion: What is the rd., time of the match with a win result, a tko type, and Carlos Molina as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"rd_time\" FROM \"professional_boxing_record\" WHERE \"res\"='win' AND \"type\"='tko' AND \"opponent\"='carlos molina';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_boxing_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"type\" text,\n \"rd_time\" text,\n \"date\" text\n);\n\nQuestion: What is the record of the match on 2009-07-18?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"professional_boxing_record\" WHERE \"date\"='2009-07-18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_boxing_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"type\" text,\n \"rd_time\" text,\n \"date\" text\n);\n\nQuestion: What is the type of the match with a win result and Michael Gomez as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"professional_boxing_record\" WHERE \"res\"='win' AND \"opponent\"='michael gomez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internationally_capped_players\" (\n \"player\" text,\n \"country\" text,\n \"caps\" real,\n \"goals\" text,\n \"years_active\" text\n);\n\nQuestion: What were the goals when the caps were set at 48?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"internationally_capped_players\" WHERE \"caps\"=48;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internationally_capped_players\" (\n \"player\" text,\n \"country\" text,\n \"caps\" real,\n \"goals\" text,\n \"years_active\" text\n);\n\nQuestion: How many caps did the player Mile Sterjovski have?"
},
{
"role": "assistant",
"content": "SELECT \"caps\" FROM \"internationally_capped_players\" WHERE \"player\"='mile sterjovski';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internationally_capped_players\" (\n \"player\" text,\n \"country\" text,\n \"caps\" real,\n \"goals\" text,\n \"years_active\" text\n);\n\nQuestion: What are the goals of Mile Sterjovski as a player?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"internationally_capped_players\" WHERE \"player\"='mile sterjovski';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internationally_capped_players\" (\n \"player\" text,\n \"country\" text,\n \"caps\" real,\n \"goals\" text,\n \"years_active\" text\n);\n\nQuestion: How many caps did Mitchell Duke have overall?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"caps\") FROM \"internationally_capped_players\" WHERE \"player\"='mitchell duke';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: Which opponent has a Date of 16 february 2003?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"fa_cup\" WHERE \"date\"='16 february 2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: Which date has an A venue with an Opponent of stoke city?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fa_cup\" WHERE \"venue\"='a' AND \"opponent\"='stoke city';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: Which opponent has a Round of r5?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"fa_cup\" WHERE \"round\"='r5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: Which Scorers have a Venue of A, and an Opponent of arsenal?"
},
{
"role": "assistant",
"content": "SELECT \"scorers\" FROM \"fa_cup\" WHERE \"venue\"='a' AND \"opponent\"='arsenal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: Which Opponent has a Round of qf replay?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"fa_cup\" WHERE \"round\"='qf replay';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who took the loss on the April 6 game?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='april 6';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What was the record after the April 15 game?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='april 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 \"record\" text\n);\n\nQuestion: Who was the opponent that led to a 10-13 record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='10-13';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What is the record after the April 6 game?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='april 6';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What was the score for the April 12 game?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What team has the most wins with at least 18 goals and less than 5 losses?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"final_standing\" WHERE \"goals_for\"=18 AND \"losses\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many times has the Cornwall HC team, that has scored more than 18 goals, lost ?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"final_standing\" WHERE \"team\"='cornwall hc' AND \"goals_for\">18;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.