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 \"list\" (\n \"country\" text,\n \"automobile_name\" text,\n \"manufacturer\" text,\n \"engine_make_capacity\" text,\n \"year\" text\n);\n\nQuestion: What country had the car with the Jawa 350cc engine?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"list\" WHERE \"engine_make_capacity\"='jawa 350cc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"automobile_name\" text,\n \"manufacturer\" text,\n \"engine_make_capacity\" text,\n \"year\" text\n);\n\nQuestion: In what country was the car with the \u010dz 171cc engine?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"list\" WHERE \"engine_make_capacity\"='\u010dz 171cc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"automobile_name\" text,\n \"manufacturer\" text,\n \"engine_make_capacity\" text,\n \"year\" text\n);\n\nQuestion: What is the name of the car that was made in the years 1956-1958?" }, { "role": "assistant", "content": "SELECT \"automobile_name\" FROM \"list\" WHERE \"year\"='1956-1958';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"automobile_name\" text,\n \"manufacturer\" text,\n \"engine_make_capacity\" text,\n \"year\" text\n);\n\nQuestion: What is the name of the car manufactured by Letecke Zavody N.P., Jinonice?" }, { "role": "assistant", "content": "SELECT \"automobile_name\" FROM \"list\" WHERE \"manufacturer\"='letecke zavody n.p., jinonice';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"automobile_name\" text,\n \"manufacturer\" text,\n \"engine_make_capacity\" text,\n \"year\" text\n);\n\nQuestion: Who manufactured the car with the jawa 249cc engine that was made in the years 1956-1963?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"list\" WHERE \"engine_make_capacity\"='jawa 249cc' AND \"year\"='1956-1963';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 2 with a Date that is jun 29?" }, { "role": "assistant", "content": "SELECT \"set_2\" FROM \"results_pool_c\" WHERE \"date\"='jun 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 1 with a Set 2 that is 25-19?" }, { "role": "assistant", "content": "SELECT \"set_1\" FROM \"results_pool_c\" WHERE \"set_2\"='25-19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_c\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 5 with a Date that is jun 29?" }, { "role": "assistant", "content": "SELECT \"set_5\" FROM \"results_pool_c\" WHERE \"date\"='jun 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: When was construction completed that was listed on 09/21/1984 and a Deleted of 11/04/1999?" }, { "role": "assistant", "content": "SELECT \"construction_completed\" FROM \"superfund_sites\" WHERE \"listed\"='09/21/1984' AND \"deleted\"='11/04/1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the partially deleted result for a completed construction of m\u2013 in St. Maries Creosote?" }, { "role": "assistant", "content": "SELECT \"partially_deleted\" FROM \"superfund_sites\" WHERE \"construction_completed\"='\u2013' AND \"name\"='st. maries creosote';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the partially deleted result for Bunker Hill Mining & Metallurgical?" }, { "role": "assistant", "content": "SELECT \"partially_deleted\" FROM \"superfund_sites\" WHERE \"name\"='bunker hill mining & metallurgical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the partially deleted result for a deleted of m\u2013 in Valley?" }, { "role": "assistant", "content": "SELECT \"partially_deleted\" FROM \"superfund_sites\" WHERE \"deleted\"='\u2013' AND \"county\"='valley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: How many matches ended with more than 22 points?" }, { "role": "assistant", "content": "SELECT SUM(\"match\") FROM \"second_league\" WHERE \"points\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_tour_results_timeline\" (\n \"1965\" text,\n \"1966\" text,\n \"1967\" text,\n \"1968\" text,\n \"1969\" text,\n \"1970\" text,\n \"1971\" text,\n \"1972\" text\n);\n\nQuestion: What is the value in 1965 when 7 is the value for 1967?" }, { "role": "assistant", "content": "SELECT \"1965\" FROM \"grand_tour_results_timeline\" WHERE \"1967\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_tour_results_timeline\" (\n \"1965\" text,\n \"1966\" text,\n \"1967\" text,\n \"1968\" text,\n \"1969\" text,\n \"1970\" text,\n \"1971\" text,\n \"1972\" text\n);\n\nQuestion: What is the value in 1971 when 30 is the value for 1969?" }, { "role": "assistant", "content": "SELECT \"1971\" FROM \"grand_tour_results_timeline\" WHERE \"1969\"='30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_tour_results_timeline\" (\n \"1965\" text,\n \"1966\" text,\n \"1967\" text,\n \"1968\" text,\n \"1969\" text,\n \"1970\" text,\n \"1971\" text,\n \"1972\" text\n);\n\nQuestion: What was the value in 1966 with a 0 value in 1969?" }, { "role": "assistant", "content": "SELECT \"1966\" FROM \"grand_tour_results_timeline\" WHERE \"1969\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Who was the player moving to Arminia Bielefeld?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"squad_changes\" WHERE \"moving_to\"='arminia bielefeld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What tournament had a Winning score of \u20139 (69-72-68-70=279)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_13\" WHERE \"winning_score\"='\u20139 (69-72-68-70=279)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score of the Greater Vancouver Open tournament?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"pga_tour_wins_13\" WHERE \"tournament\"='greater vancouver open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which runner(s)-up had a Winning score of \u201313 (68-70-66-71=275) and a Margin of victory of 3 strokes?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_13\" WHERE \"margin_of_victory\"='3 strokes' AND \"winning_score\"='\u201313 (68-70-66-71=275)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the Margin of victory in the southwest golf classic Tournament?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_13\" WHERE \"tournament\"='southwest golf classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: When the Winning score was \u20139 (69-72-68-70=279), what was the Margin of victory?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_13\" WHERE \"winning_score\"='\u20139 (69-72-68-70=279)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings_by_state_or_territory\" (\n \"state_territory\" text,\n \"building\" text,\n \"height\" text,\n \"floor_count\" real,\n \"completed\" real\n);\n\nQuestion: What height has a floor count less than 25?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"tallest_buildings_by_state_or_territory\" WHERE \"floor_count\"<25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings_by_state_or_territory\" (\n \"state_territory\" text,\n \"building\" text,\n \"height\" text,\n \"floor_count\" real,\n \"completed\" real\n);\n\nQuestion: What state/territory has 121 m as the height?" }, { "role": "assistant", "content": "SELECT \"state_territory\" FROM \"tallest_buildings_by_state_or_territory\" WHERE \"height\"='121 m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings_by_state_or_territory\" (\n \"state_territory\" text,\n \"building\" text,\n \"height\" text,\n \"floor_count\" real,\n \"completed\" real\n);\n\nQuestion: What state/territory has lovett tower as the building?" }, { "role": "assistant", "content": "SELECT \"state_territory\" FROM \"tallest_buildings_by_state_or_territory\" WHERE \"building\"='lovett tower';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the date of the game against Oakland Raiders?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"opponent\"='oakland raiders';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_champions_league\" (\n \"year\" text,\n \"matches\" text,\n \"wins\" text,\n \"losses\" text,\n \"no_result\" text,\n \"success_rate\" text\n);\n\nQuestion: What year has 2 wins?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"performance_summary_in_champions_league\" WHERE \"wins\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_champions_league\" (\n \"year\" text,\n \"matches\" text,\n \"wins\" text,\n \"losses\" text,\n \"no_result\" text,\n \"success_rate\" text\n);\n\nQuestion: What is the success rate for the year 2012?" }, { "role": "assistant", "content": "SELECT \"success_rate\" FROM \"performance_summary_in_champions_league\" WHERE \"year\"='2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_champions_league\" (\n \"year\" text,\n \"matches\" text,\n \"wins\" text,\n \"losses\" text,\n \"no_result\" text,\n \"success_rate\" text\n);\n\nQuestion: What was the win for 4 matches with a success rate of 25%?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"performance_summary_in_champions_league\" WHERE \"matches\"='4' AND \"success_rate\"='25%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_champions_league\" (\n \"year\" text,\n \"matches\" text,\n \"wins\" text,\n \"losses\" text,\n \"no_result\" text,\n \"success_rate\" text\n);\n\nQuestion: what was the win for the 6 matches?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"performance_summary_in_champions_league\" WHERE \"matches\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_champions_league\" (\n \"year\" text,\n \"matches\" text,\n \"wins\" text,\n \"losses\" text,\n \"no_result\" text,\n \"success_rate\" text\n);\n\nQuestion: What is the losses for the 5 matches?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"performance_summary_in_champions_league\" WHERE \"matches\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_summary_in_champions_league\" (\n \"year\" text,\n \"matches\" text,\n \"wins\" text,\n \"losses\" text,\n \"no_result\" text,\n \"success_rate\" text\n);\n\nQuestion: What is the losses for the year 2012?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"performance_summary_in_champions_league\" WHERE \"year\"='2012';" } ]
[ { "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 average Total with a Gold that is larger than 4?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"gold\">4;" } ]
[ { "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 average Total with a Bronze that is larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Who were the Brazil scorers for the World Cup Competition with a 1-2 score?" }, { "role": "assistant", "content": "SELECT \"brazil_scorers\" FROM \"brazil_national_team\" WHERE \"competition\"='world cup' AND \"score\"='1-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Which competition had a 4-3 score?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"brazil_national_team\" WHERE \"score\"='4-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the highest Top-5 that has 18 or more events with a Top-25 of 23?" }, { "role": "assistant", "content": "SELECT MAX(\"top_5\") FROM \"summary\" WHERE \"events\">18 AND \"top_25\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest cuts made that had a Top-25 less than 6 and wins greater than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"cuts_made\") FROM \"summary\" WHERE \"top_25\"<6 AND \"wins\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What race did Glenn Seton win on the Sandown International Raceway circuit?" }, { "role": "assistant", "content": "SELECT \"race_title\" FROM \"race_calendar\" WHERE \"winner\"='glenn seton' AND \"circuit\"='sandown international raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What date was the race at Oran Park ran?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"race_title\"='oran park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"assists\" real\n);\n\nQuestion: What is the largest number of assists for the second rank when there were less than 2 games?" }, { "role": "assistant", "content": "SELECT MAX(\"assists\") FROM \"assists\" WHERE \"rank\"=2 AND \"games\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"assists\" real\n);\n\nQuestion: What is the smallest rank when there are more than 2 games?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"assists\" WHERE \"games\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"assists\" real\n);\n\nQuestion: What is the mean number of games for pablo prigioni when there are more than 14 assists?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"assists\" WHERE \"name\"='pablo prigioni' AND \"assists\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_trolleybus_systems_in_russia\" (\n \"region\" text,\n \"location\" text,\n \"from\" text,\n \"depots_12_09\" real,\n \"routes_12_09\" real,\n \"vehicles_12_09\" real\n);\n\nQuestion: What region has 57 vehicles?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"list_of_trolleybus_systems_in_russia\" WHERE \"vehicles_12_09\"=57;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"year\" real,\n \"category\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: What was the Score after 1991 in Category IVA?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles\" WHERE \"year\">1991 AND \"category\"='iva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"year\" real,\n \"category\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: What was the Score in 2002?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles\" WHERE \"year\"=2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"year\" real,\n \"category\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: What was the Category before 1995?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"doubles\" WHERE \"year\"<1995;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"year\" real,\n \"category\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: What was the Category after 1991 with a Score of 7-5, 6-7, 6-2?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"doubles\" WHERE \"year\">1991 AND \"score\"='7-5, 6-7, 6-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What was the issue date for the song by Paul Mccartney and Michael Jackson?" }, { "role": "assistant", "content": "SELECT \"issue_date_s\" FROM \"see_also\" WHERE \"artist\"='paul mccartney and michael jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chhattisgarh_result\" (\n \"state\" text,\n \"seats_a_cs\" real,\n \"date_of_counting\" text,\n \"incumbent\" text,\n \"election_winner\" text\n);\n\nQuestion: What is the smallest number of seats with INC as an election winner and BJP incumbent?" }, { "role": "assistant", "content": "SELECT MIN(\"seats_a_cs\") FROM \"chhattisgarh_result\" WHERE \"election_winner\"='inc' AND \"incumbent\"='bjp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chhattisgarh_result\" (\n \"state\" text,\n \"seats_a_cs\" real,\n \"date_of_counting\" text,\n \"incumbent\" text,\n \"election_winner\" text\n);\n\nQuestion: Who was the election winner with a BJP incumbent in Chhattisgarh?" }, { "role": "assistant", "content": "SELECT \"election_winner\" FROM \"chhattisgarh_result\" WHERE \"incumbent\"='bjp' AND \"state\"='chhattisgarh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"chhattisgarh_result\" (\n \"state\" text,\n \"seats_a_cs\" real,\n \"date_of_counting\" text,\n \"incumbent\" text,\n \"election_winner\" text\n);\n\nQuestion: When was the date of counting with less than 87 seats, INC as incumbent and INC as election winner?" }, { "role": "assistant", "content": "SELECT \"date_of_counting\" FROM \"chhattisgarh_result\" WHERE \"seats_a_cs\"<87 AND \"incumbent\"='inc' AND \"election_winner\"='inc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which country has an IATA of EVN?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"destinations\" WHERE \"iata\"='evn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the name of the airport located in Russia with an IATA of AER?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"destinations\" WHERE \"country\"='russia' AND \"iata\"='aer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the name of the airport located in Russia with an IATA of KRR?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"destinations\" WHERE \"country\"='russia' AND \"iata\"='krr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the name of the airport with an ICAO of ULLI?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"destinations\" WHERE \"icao\"='ulli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO for the destination in Armenia?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"destinations\" WHERE \"country\"='armenia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the name of the airport with an IATA of KUF?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"destinations\" WHERE \"iata\"='kuf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is the status of Author Del Corro?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"newly_named_dinosaurs\" WHERE \"authors\"='del corro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is the location of the authors of Molnar?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"newly_named_dinosaurs\" WHERE \"authors\"='molnar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is the status of Prenocephale?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"newly_named_dinosaurs\" WHERE \"name\"='prenocephale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is the novel that has a valid status, located in Mongolia, and named Prenocephale?" }, { "role": "assistant", "content": "SELECT \"novelty\" FROM \"newly_named_dinosaurs\" WHERE \"status\"='valid' AND \"location\"='mongolia' AND \"name\"='prenocephale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is the novelty of Tylocephale?" }, { "role": "assistant", "content": "SELECT \"novelty\" FROM \"newly_named_dinosaurs\" WHERE \"name\"='tylocephale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which team 1 has vfl gummersbach as team 2?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"round_of_16\" WHERE \"team_2\"='vfl gummersbach';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg that has 31-37 as the 1st leg?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"round_of_16\" WHERE \"1st_leg\"='31-37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which team 1 has cbm valladolid as team 2?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"round_of_16\" WHERE \"team_2\"='cbm valladolid';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What 2nd leg has rk gold club kozina as team 1?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"round_of_16\" WHERE \"team_1\"='rk gold club kozina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What 1st leg has 52-70 as the agg.?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"round_of_16\" WHERE \"agg\"='52-70';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_13_7_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the surface for October 10, 2004?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_13_7_6\" WHERE \"date\"='october 10, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_13_7_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the surface for the opponent Roger Federer?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_13_7_6\" WHERE \"opponent\"='roger federer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: How many years was the 400 m event in the olympic games?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"competition_record\" WHERE \"competition\"='olympic games' AND \"event\"='400 m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many were in attendance of the game with l 26-21 result?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"season_schedule\" WHERE \"result\"='l 26-21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the opponent for the game with 37,845 people in attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"attendance\"='37,845';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_tables\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals were there with 2 gold medals and more than 2 bronze medals?" }, { "role": "assistant", "content": "SELECT \"silver\" FROM \"all_time_medal_tables\" WHERE \"gold\"=2 AND \"bronze\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_tables\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest total number of medals for rank 11 and more than 0 silver medals?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"all_time_medal_tables\" WHERE \"rank\"='11' AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_tables\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of all total medals with more than 2 bronze medals and more than 1 gold medal for the United States?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"all_time_medal_tables\" WHERE \"bronze\">2 AND \"nation\"='united states' AND \"gold\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_tables\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest number of gold medals for Canada with more than 7 bronze medals?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"all_time_medal_tables\" WHERE \"nation\"='canada' AND \"bronze\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_medal_tables\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of all silver medals with less than 23 medals in total and more than 3 bronze medals for the United States?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"all_time_medal_tables\" WHERE \"total\"<23 AND \"nation\"='united states' AND \"bronze\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"100_meters\" (\n \"year\" real,\n \"result\" real,\n \"world_rank\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: When was Steve Williams in Zurich and his result was 10.07?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"100_meters\" WHERE \"location\"='zurich' AND \"result\"=10.07;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_group\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What is the largest number lost with 0 draws and less than 12 points for Gwardia Katowice?" }, { "role": "assistant", "content": "SELECT MAX(\"lost\") FROM \"south_group\" WHERE \"draw\"=0 AND \"team\"='gwardia katowice' AND \"points\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_group\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What is the highest number of draws with 6 losses and less than 15 points?" }, { "role": "assistant", "content": "SELECT MAX(\"draw\") FROM \"south_group\" WHERE \"lost\"=6 AND \"points\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_group\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: How many draws correspond to more than 11 losses in a match less than 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"south_group\" WHERE \"lost\">11 AND \"match\"<14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Director of Children of Sarajevo?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='children of sarajevo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Result of the 2010 (83rd) Ceremony?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"submissions\" WHERE \"year_ceremony\"='2010 (83rd)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Result of the 2013 (86th) Ceremony?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"submissions\" WHERE \"year_ceremony\"='2013 (86th)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Original title of Children of Sarajevo?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='children of sarajevo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: In the 2012 (85th) Ceremony, what was the Original title of the film not nominated?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"result\"='not nominated' AND \"year_ceremony\"='2012 (85th)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: What is the lowest draw number for the song ranked 6th with more than 43 points?" }, { "role": "assistant", "content": "SELECT MIN(\"draw\") FROM \"references\" WHERE \"points\">43 AND \"rank\"='6th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: What is the total sum of points for songs performed by Partners in Crime?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"references\" WHERE \"performer\"='partners in crime';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wzxv\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the class of facility ID 150935?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"broadcast_translators_of_wzxv\" WHERE \"facility_id\"=150935;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wzxv\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which city has a facility ID greater than 150833?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"broadcast_translators_of_wzxv\" WHERE \"facility_id\">150833;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does the player from the Toronto Argonauts play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_one\" WHERE \"cfl_team\"='toronto argonauts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg for Team 2 Concepto Egile?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"matches\" WHERE \"team_2\"='concepto egile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which team 1 has team 2, Gomera?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"matches\" WHERE \"team_2\"='gomera';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naia_football_independents\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"team\" text,\n \"primary_conference\" text\n);\n\nQuestion: What public team was founded prior to 1883?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"naia_football_independents\" WHERE \"founded\"<1883 AND \"type\"='public';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real\n);\n\nQuestion: Who has exactly 342 spikes?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"spike\"=342;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real\n);\n\nQuestion: What is the smallest number of spikes for players with a weight of 83 and height over 190?" }, { "role": "assistant", "content": "SELECT MIN(\"spike\") FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"weight\"=83 AND \"height\">190;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbqt_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is Class, when Power is 78 Watts?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbqt_fm\" WHERE \"power\"='78 watts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbqt_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is Power, when Identifier is CBEB-FM?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbqt_fm\" WHERE \"identifier\"='cbeb-fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbqt_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is Identifier, when City of License is Terrace Bay?" }, { "role": "assistant", "content": "SELECT \"identifier\" FROM \"s_rebroadcaster_of_cbqt_fm\" WHERE \"city_of_license\"='terrace bay';" } ]