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 \"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 City of License is Sioux Lookout?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbqt_fm\" WHERE \"city_of_license\"='sioux lookout';"
}
] |
[
{
"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 Hornepayne?"
},
{
"role": "assistant",
"content": "SELECT \"identifier\" FROM \"s_rebroadcaster_of_cbqt_fm\" WHERE \"city_of_license\"='hornepayne';"
}
] |
[
{
"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 City of License, when Frequency is 101.1?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cbqt_fm\" WHERE \"frequency\"='101.1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"le_5_model_specifications\" (\n \"le_5_model\" text,\n \"le_5\" text,\n \"le_5_a\" text,\n \"le_5_b\" text,\n \"le_5_b_2\" text\n);\n\nQuestion: Which LE-5 Model has an LE-5A of 130?"
},
{
"role": "assistant",
"content": "SELECT \"le_5_model\" FROM \"le_5_model_specifications\" WHERE \"le_5_a\"='130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What Series had 14 races and 12th position?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_summary\" WHERE \"races\"=14 AND \"position\"='12th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What season was the Formula BMW USA in?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"career_summary\" WHERE \"series\"='formula bmw usa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What series had more than 10 Podiums?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"career_summary\" WHERE \"podiums\">10;"
}
] |
[
{
"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 \"unit\" text,\n \"location\" text\n);\n\nQuestion: What is the Status with an Author that is colbert?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"newly_named_dinosaurs\" WHERE \"authors\"='colbert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What college was the draft pick number larger than 18 that went to the Barangay ginebra kings?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_3\" WHERE \"pick\">18 AND \"pba_team\"='barangay ginebra kings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of the pick numbers for the player that went to San Miguel Beermen who played at San Sebastian?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"round_3\" WHERE \"pba_team\"='san miguel beermen' AND \"college\"='san sebastian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of picks for PBA team san miguel beermen who picked rommel daep?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"round_3\" WHERE \"pba_team\"='san miguel beermen' AND \"player\"='rommel daep';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What player came from the United States and went to Ohlone college?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_3\" WHERE \"country_of_origin\"='united states' AND \"college\"='ohlone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"champions\" text,\n \"result\" text,\n \"runners_up\" text,\n \"playoffs_mvp\" text\n);\n\nQuestion: Who won after 1999 with changwon lg sakers as runners-up?"
},
{
"role": "assistant",
"content": "SELECT \"champions\" FROM \"results\" WHERE \"year\">1999 AND \"runners_up\"='changwon lg sakers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"champions\" text,\n \"result\" text,\n \"runners_up\" text,\n \"playoffs_mvp\" text\n);\n\nQuestion: What is the result for the champions jeonju kcc egis with runners-up seoul samsung thunders after 2007?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"results\" WHERE \"year\">2007 AND \"runners_up\"='seoul samsung thunders' AND \"champions\"='jeonju kcc egis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"winning_team\" text,\n \"score\" text,\n \"usa_captain\" text,\n \"europe_captain\" text\n);\n\nQuestion: What was the winning team in 2013?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"results\" WHERE \"year\"=2013;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"winning_team\" text,\n \"score\" text,\n \"usa_captain\" text,\n \"europe_captain\" text\n);\n\nQuestion: What is the highest year that Europe won, when the USA's Captain was Kathy Whitworth?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"results\" WHERE \"winning_team\"='europe' AND \"usa_captain\"='kathy whitworth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"winning_team\" text,\n \"score\" text,\n \"usa_captain\" text,\n \"europe_captain\" text\n);\n\nQuestion: When the USA's captain was Beth Daniel, who was the winning team?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"results\" WHERE \"usa_captain\"='beth daniel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"postseason\" text,\n \"european_competitions\" text\n);\n\nQuestion: What is the Season when league shows bundesliga, and a European competition of played korac cup?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season\" WHERE \"league\"='bundesliga' AND \"european_competitions\"='played korac cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"postseason\" text,\n \"european_competitions\" text\n);\n\nQuestion: What is the average Tier when the postseason shows -, and the season is 2012\u201313?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"tier\") FROM \"season_by_season\" WHERE \"postseason\"='\u2013' AND \"season\"='2012\u201313';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"league\" text,\n \"postseason\" text,\n \"european_competitions\" text\n);\n\nQuestion: What is the European competition when the tier is more than 2?"
},
{
"role": "assistant",
"content": "SELECT \"european_competitions\" FROM \"season_by_season\" WHERE \"tier\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_titles_3_runner_ups\" (\n \"outcome\" text,\n \"date_final\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the match played on grass?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_7_4_titles_3_runner_ups\" WHERE \"surface\"='grass';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_4_titles_3_runner_ups\" (\n \"outcome\" text,\n \"date_final\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the match on February 17, 2003?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_7_4_titles_3_runner_ups\" WHERE \"date_final\"='february 17, 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"pos\" real,\n \"team\" text,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"goals\" text,\n \"diff\" text,\n \"points\" text\n);\n\nQuestion: How many average wins have USA as the team?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"group_b\" WHERE \"team\"='usa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"pos\" real,\n \"team\" text,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"goals\" text,\n \"diff\" text,\n \"points\" text\n);\n\nQuestion: What are the average wins that have great britain as the team?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"group_b\" WHERE \"team\"='great britain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What's the average draft pick number from Carson-Newman College before Round 7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick_num\") FROM \"nfl_draft\" WHERE \"college\"='carson-newman' AND \"round\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college has a pick number of 155?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"pick_num\"=155;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_circuit_doubles_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What score in the final has november 3, 2002 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"itf_circuit_doubles_9_4_5\" WHERE \"date\"='november 3, 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_circuit_doubles_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What surface has natalia gussoni as the partner?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"itf_circuit_doubles_9_4_5\" WHERE \"partner\"='natalia gussoni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_circuit_doubles_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What outcome has September 23, 2013 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"itf_circuit_doubles_9_4_5\" WHERE \"date\"='september 23, 2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_circuit_doubles_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What score in the final has hard as the surface, and june 13, 2011 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"itf_circuit_doubles_9_4_5\" WHERE \"surface\"='hard' AND \"date\"='june 13, 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_circuit_doubles_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What date has elke clijsters as the partner?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"itf_circuit_doubles_9_4_5\" WHERE \"partner\"='elke clijsters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date_weekend_of\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is the Round with a Prize of money that is \u00a3120,000?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"calendar\" WHERE \"prize_money\"='\u00a3120,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date_weekend_of\" text,\n \"matches\" real,\n \"clubs\" text,\n \"prize_money\" text\n);\n\nQuestion: What is the Match with a Prize of money that is \u00a31,000,000?"
},
{
"role": "assistant",
"content": "SELECT \"matches\" FROM \"calendar\" WHERE \"prize_money\"='\u00a31,000,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"film\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"actor\" text,\n \"role\" text\n);\n\nQuestion: When alvin and the chipmunks meet frankenstein, what was the role?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"film\" WHERE \"title\"='alvin and the chipmunks meet frankenstein';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"film\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"actor\" text,\n \"role\" text\n);\n\nQuestion: What's the earliest year with a role of alvin seville simon seville david 'dave' seville, and a Title of alvin and the chipmunks meet the wolfman?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"film\" WHERE \"role\"='alvin seville simon seville david ''dave'' seville' AND \"title\"='alvin and the chipmunks meet the wolfman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"film\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"actor\" text,\n \"role\" text\n);\n\nQuestion: What's the average year for the Role of alvin seville simon seville david 'dave' seville, and a Title of the chipmunk adventure?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"film\" WHERE \"role\"='alvin seville simon seville david ''dave'' seville' AND \"title\"='the chipmunk adventure';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"film\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"actor\" text,\n \"role\" text\n);\n\nQuestion: What was the role in the chipmunk adventure?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"film\" WHERE \"title\"='the chipmunk adventure';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"film\" (\n \"year\" real,\n \"title\" text,\n \"producer\" text,\n \"actor\" text,\n \"role\" text\n);\n\nQuestion: What role was played in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"film\" WHERE \"year\"=2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_car_series\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of points for the KV Racing Technology team when they use a chevrolet engine?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"indy_car_series\" WHERE \"engine\"='chevrolet' AND \"team\"='kv racing technology';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_car_series\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Which engine has a chassis of dallara, is ranked 6th, and has 384 points?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"indy_car_series\" WHERE \"chassis\"='dallara' AND \"rank\"='6th' AND \"points\"=384;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_car_series\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Which engine is used when there is a 3rd place rank and 513 points?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"indy_car_series\" WHERE \"rank\"='3rd' AND \"points\"=513;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_car_series\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What is the chassis when the rank is 3rd?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"indy_car_series\" WHERE \"rank\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_car_series\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What are the years that Andretti Autosport is a team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"indy_car_series\" WHERE \"team\"='andretti autosport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_car_series\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Which team is ranked 3rd in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"indy_car_series\" WHERE \"rank\"='3rd' AND \"year\"=2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"oilers_points\" real,\n \"opponents\" real,\n \"oilers_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Oilers points have a Record of 10\u20136, and Oilers first downs larger than 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"oilers_points\") FROM \"schedule\" WHERE \"record\"='10\u20136' AND \"oilers_first_downs\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"oilers_points\" real,\n \"opponents\" real,\n \"oilers_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Oilers points have an Opponent of san francisco 49ers, and Opponents larger than 19?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"oilers_points\") FROM \"schedule\" WHERE \"opponent\"='san francisco 49ers' AND \"opponents\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"oilers_points\" real,\n \"opponents\" real,\n \"oilers_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Game has an Opponent of at kansas city chiefs, and an Attendance smaller than 40,213?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"schedule\" WHERE \"opponent\"='at kansas city chiefs' AND \"attendance\"<'40,213';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the name of the country that has 18 May 2004 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"date\"='18 may 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What catalog has Australia as the country?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"country\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: In what format was the release that was dated 7 April 2003 from catalog 584 2112?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='7 april 2003' AND \"catalog\"='584 2112';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date was the release when the format was lp?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='lp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date is the release when the label was Parlophone and the catalog was 582 2912?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='parlophone' AND \"catalog\"='582 2912';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What catalog has the United Kingdom as the country?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"country\"='united kingdom';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the guard for the chool/Club Team in Virginia?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"a\" WHERE \"position\"='guard' AND \"school_club_team\"='virginia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the School/Club Team with a nationality of United States for Arron Afflalo?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"a\" WHERE \"nationality\"='united states' AND \"player\"='arron afflalo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Years in Orlando for carlos arroyo?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_orlando\" FROM \"a\" WHERE \"player\"='carlos arroyo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Player for Orlando in 1989\u20131991?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"a\" WHERE \"years_in_orlando\"='1989\u20131991';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Position for Orlando for 1989\u20131999?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"a\" WHERE \"years_in_orlando\"='1989\u20131999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mcla_division_2\" (\n \"year\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: Which player was from Western Washington University, played midfield, and was from years after 2009?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"mcla_division_2\" WHERE \"school\"='western washington university' AND \"position\"='midfield' AND \"year\">2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mcla_division_2\" (\n \"year\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: Which team was Bubba Vanegdom from?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"mcla_division_2\" WHERE \"player\"='bubba vanegdom';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mcla_division_2\" (\n \"year\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What was the position of the player from Pacific Lutheran University named Greg Fredlund in years after 2010?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"mcla_division_2\" WHERE \"school\"='pacific lutheran university' AND \"player\"='greg fredlund' AND \"year\">2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mcla_division_2\" (\n \"year\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What was the position of Greg Fredlund in years after 2008?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"mcla_division_2\" WHERE \"year\">2008 AND \"player\"='greg fredlund';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" real\n);\n\nQuestion: What home team has 8 ties?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner_male\" text,\n \"winner_female\" text,\n \"talent_male\" text,\n \"talent_female\" text\n);\n\nQuestion: What year had Kim Gevaert as the female winner and Xavier de Baerdemaeker as the male talent?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners\" WHERE \"winner_female\"='kim gevaert' AND \"talent_male\"='xavier de baerdemaeker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner_male\" text,\n \"winner_female\" text,\n \"talent_male\" text,\n \"talent_female\" text\n);\n\nQuestion: Who is the female talent in 1999?"
},
{
"role": "assistant",
"content": "SELECT \"talent_female\" FROM \"winners\" WHERE \"year\"=1999;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner_male\" text,\n \"winner_female\" text,\n \"talent_male\" text,\n \"talent_female\" text\n);\n\nQuestion: Who is the male talent in 1991?"
},
{
"role": "assistant",
"content": "SELECT \"talent_male\" FROM \"winners\" WHERE \"year\"=1991;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner_male\" text,\n \"winner_female\" text,\n \"talent_male\" text,\n \"talent_female\" text\n);\n\nQuestion: Who is the male winner the year after 1998 with Marleen Renders as the female winner?"
},
{
"role": "assistant",
"content": "SELECT \"winner_male\" FROM \"winners\" WHERE \"winner_female\"='marleen renders' AND \"year\">1998;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp_int\" text,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest avg/g that has an effic greater than 34.36, with wesley carroll as the name?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"avg_g\") FROM \"passing\" WHERE \"effic\">34.36 AND \"name\"='wesley carroll';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp_int\" text,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest avg/g that has 2-9-0 for the att-cmp-int?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"avg_g\") FROM \"passing\" WHERE \"att_cmp_int\"='2-9-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp_int\" text,\n \"avg_g\" real\n);\n\nQuestion: What is the att-cmp-int that has 12 for the gp-gs and 174.3 as the avg/g?"
},
{
"role": "assistant",
"content": "SELECT \"att_cmp_int\" FROM \"passing\" WHERE \"gp_gs\"='12' AND \"avg_g\"=174.3;"
}
] |
[
{
"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 is the Song with an Issue Date(s) that is 19 june?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"see_also\" WHERE \"issue_date_s\"='19 june';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tunnels\" (\n \"milepost\" real,\n \"name_of_the_tunnel\" text,\n \"length\" text,\n \"maximum_height\" text,\n \"minimum_height\" text\n);\n\nQuestion: What is the minimum Height of the Little Switzerland Tunnel?"
},
{
"role": "assistant",
"content": "SELECT \"minimum_height\" FROM \"tunnels\" WHERE \"name_of_the_tunnel\"='little switzerland tunnel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tunnels\" (\n \"milepost\" real,\n \"name_of_the_tunnel\" text,\n \"length\" text,\n \"maximum_height\" text,\n \"minimum_height\" text\n);\n\nQuestion: What is the Milepost of the Twin Tunnel #1 North?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"milepost\") FROM \"tunnels\" WHERE \"name_of_the_tunnel\"='twin tunnel #1 north';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_population\" (\n \"rank\" real,\n \"province\" text,\n \"population\" real,\n \"area\" real,\n \"density\" real\n);\n\nQuestion: WHat is the number of Population has a Density of 50.09 and a Rank larger than 30?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"by_population\" WHERE \"density\"=50.09 AND \"rank\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_population\" (\n \"rank\" real,\n \"province\" text,\n \"population\" real,\n \"area\" real,\n \"density\" real\n);\n\nQuestion: What is the Density that has a Population larger than 290,458, and an Area of 91.6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"density\") FROM \"by_population\" WHERE \"population\">'290,458' AND \"area\"=91.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What is the Icelandic word for the English word bride?"
},
{
"role": "assistant",
"content": "SELECT \"icelandic\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"english\"='bride';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What is the ENglish word for the Icelandic word hlaupa?"
},
{
"role": "assistant",
"content": "SELECT \"english\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"icelandic\"='hlaupa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What is the Russian word for the Greek word greek?"
},
{
"role": "assistant",
"content": "SELECT \"russian\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"greek\"='greek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What is the English word for the Latin word uxor?"
},
{
"role": "assistant",
"content": "SELECT \"english\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"latin\"='uxor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What is the Latin word for the English word bone?"
},
{
"role": "assistant",
"content": "SELECT \"latin\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"english\"='bone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest against that has bacchus marsh as a ballarat fl, with wins less than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2005_ladder\" WHERE \"ballarat_fl\"='bacchus marsh' AND \"wins\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest draws that have losses greater than 0, an against less than 1728, melton as the ballarat fl, and byes less than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"2005_ladder\" WHERE \"losses\">0 AND \"against\"<1728 AND \"ballarat_fl\"='melton' AND \"byes\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many losses have byes greater than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2005_ladder\" WHERE \"byes\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest draws that have losses less than 0, an against greater than 1353, 2 as the wins, and ballarat as ballarat fl?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"2005_ladder\" WHERE \"losses\">0 AND \"against\">1353 AND \"wins\"=2 AND \"ballarat_fl\"='ballarat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"school\" text,\n \"position\" text,\n \"points\" text,\n \"pct_of_points_possible\" text\n);\n\nQuestion: What is the total year of the winner who plays the halfback position with a % of points possible of 80.64%?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"winners\" WHERE \"position\"='halfback' AND \"pct_of_points_possible\"='80.64%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"school\" text,\n \"position\" text,\n \"points\" text,\n \"pct_of_points_possible\" text\n);\n\nQuestion: What is the year of the winner from the army school, plays the halfback position, and has a % of points possible of 39.01%?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"winners\" WHERE \"school\"='army' AND \"position\"='halfback' AND \"pct_of_points_possible\"='39.01%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"school\" text,\n \"position\" text,\n \"points\" text,\n \"pct_of_points_possible\" text\n);\n\nQuestion: What position does the winner from Ohio State with 412 points play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"winners\" WHERE \"school\"='ohio state' AND \"points\"='412';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"school\" text,\n \"position\" text,\n \"points\" text,\n \"pct_of_points_possible\" text\n);\n\nQuestion: What is the % of points possible of the winner from Penn State?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_points_possible\" FROM \"winners\" WHERE \"school\"='penn state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winner\" text,\n \"school\" text,\n \"position\" text,\n \"points\" text,\n \"pct_of_points_possible\" text\n);\n\nQuestion: What is the position of the winner with 792 points?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"winners\" WHERE \"points\"='792';"
}
] |
[
{
"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 \"at_vs\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many were in Attendance on February 21, 1988 against the New Jersey Saints?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='new jersey saints' AND \"date\"='february 21, 1988';"
}
] |
[
{
"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 \"at_vs\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Opponent on February 6, 1988?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='february 6, 1988';"
}
] |
[
{
"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-10, when Top-25 is 4, and when Top-5 is greater than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_10\") FROM \"summary\" WHERE \"top_25\"=4 AND \"top_5\">1;"
}
] |
[
{
"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 Wins, when Top-25 is less than 4, and when Top-5 is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"summary\" WHERE \"top_25\"<4 AND \"top_5\">0;"
}
] |
[
{
"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 total number of Wins, when Top-25 is less than 4, and when Top-10 is less than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"summary\" WHERE \"top_25\"<4 AND \"top_10\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which home team played in the matchup with an away team of Liverpool?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"away_team\"='liverpool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the date of tie number 5?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team for tie number 9?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the replay at Millwall?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='replay' AND \"home_team\"='millwall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team for tie number 16?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the golds of the nation with 5 total and less than 0 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"total\"=5 AND \"bronze\"<0;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.