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 \"division_one_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the goal difference where the goals against is less than 54, goals for is greater than 51 and points 1 is 63?"
},
{
"role": "assistant",
"content": "SELECT \"goal_difference\" FROM \"division_one_final_table\" WHERE \"goals_against\"<54 AND \"goals_for\">51 AND \"points_1\"='63';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_one_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the number of games lost when goal difference is +13 and draws are more than 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"division_one_final_table\" WHERE \"goal_difference\"='+13' AND \"drawn\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What was the finishing position for the car that started in grid 6?"
},
{
"role": "assistant",
"content": "SELECT \"fin_pos\" FROM \"classification\" WHERE \"grid\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What team started in grid 11?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"classification\" WHERE \"grid\"='11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What was the time/retired of car number 6."
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"car_no\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What was the grid number of the team and driver with 14 points?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"classification\" WHERE \"points\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_3_2\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who did Thomaz Bellucci play against when he became runner-up on a clay surface?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_5_3_2\" WHERE \"outcome\"='runner-up' AND \"surface\"='clay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_3_2\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament did Thomaz Bellucci become runner-up on a clay surface?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_5_3_2\" WHERE \"outcome\"='runner-up' AND \"surface\"='clay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_3_2\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What type of surface did Thomaz Bellucci play against tommy robredo?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_5_3_2\" WHERE \"opponent\"='tommy robredo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: What is the result of the match against Ryan Schultz?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='ryan schultz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: What round was the game against Cedric Marks?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='cedric marks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: What was the record of the match against Chris Mounce?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='chris mounce';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: What is the method in the round 2 win over Nick Gilardi?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='2' AND \"res\"='win' AND \"opponent\"='nick gilardi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Who is number 7 when Sophia is number 3 and Abigail is number 10?"
},
{
"role": "assistant",
"content": "SELECT \"no_7\" FROM \"female_names\" WHERE \"no_3\"='sophia' AND \"no_10\"='abigail';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Which region (year) has Abigail at number 7, Sophia at number 1 and Aaliyah at number 5?"
},
{
"role": "assistant",
"content": "SELECT \"region_year\" FROM \"female_names\" WHERE \"no_7\"='abigail' AND \"no_1\"='sophia' AND \"no_5\"='aaliyah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Who is number 4 when Harper is number 10 and Abigail is number 5?"
},
{
"role": "assistant",
"content": "SELECT \"no_4\" FROM \"female_names\" WHERE \"no_10\"='harper' AND \"no_5\"='abigail';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Player, when To Par is \"+1\", and when Score is \"75-68=143\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"to_par\"='+1' AND \"score\"='75-68=143';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Player is \"Andy North\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='andy north';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is To Par, when Score is \"69-72=141\""
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='69-72=141';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Score is \"73-71=144\", and when Player is \"Scott Simpson\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='73-71=144' AND \"player\"='scott simpson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Country is \"United States\", and when Player is \"John Mahaffey\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"player\"='john mahaffey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is To Par, when Place is \"T1\", and when Player is \"Joey Rassett\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t1' AND \"player\"='joey rassett';"
}
] |
[
{
"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 when the away team was brighton & hove albion?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"away_team\"='brighton & hove albion';"
}
] |
[
{
"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: When was the away team burnley?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='burnley';"
}
] |
[
{
"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 had an away team of Reading?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"away_team\"='reading';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"nominated_work\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What year was the accolade for Scottish albums of the decade?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"accolades\" WHERE \"accolade\"='scottish albums of the decade';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"nominated_work\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What country had the publication, Drowned in Sound?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"accolades\" WHERE \"publication\"='drowned in sound';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the home stadium of Brisbane Lions?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"round_2\" WHERE \"home_team\"='brisbane lions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How much is the crowd attending at colonial stadium where Hawthorn plays?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_2\" WHERE \"ground\"='colonial stadium' AND \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people attended as the score ended 13.10 (88)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_2\" WHERE \"home_team_score\"='13.10 (88)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"4_tatars\" (\n \"c_w_15\" real,\n \"oblast_age\" text,\n \"15_to_17\" real,\n \"18_to_19\" real,\n \"20_to_24\" real,\n \"25_to_29\" real,\n \"30_to_34\" real,\n \"35_to_39\" real,\n \"40_to_44\" real,\n \"45_to_49\" real,\n \"50_to_54\" real,\n \"55_to_59\" real,\n \"60_to_64\" real,\n \"65_to_69\" real\n);\n\nQuestion: what is the least 60-64 when 30-34 is 1,403 and 20-24 is less than 378?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"60_to_64\") FROM \"4_tatars\" WHERE \"30_to_34\"='1,403' AND \"20_to_24\"<378;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_16\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"3rd_leg\" text\n);\n\nQuestion: what is the 2nd leg when team #2 is \u017ealgiris kaunas?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"top_16\" WHERE \"team_num2\"='\u017ealgiris kaunas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_16\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"3rd_leg\" text\n);\n\nQuestion: what is the 2nd leg when team #2 is \u017ealgiris kaunas?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"top_16\" WHERE \"team_num2\"='\u017ealgiris kaunas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent in week 6?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Which week had an attendance of 55,158?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\"='55,158';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the lowest game on February 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"date\"='february 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Which Player has a Round larger than 5, and a Position of (g)?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\">5 AND \"position\"='(g)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Which Round has a Nationality of united states, and a Player of jimmy hayes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"nationality\"='united states' AND \"player\"='jimmy hayes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Which Pick has a Nationality of canada, and a Round of 5?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"round\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Which Club Team has a Position of (d), a Nationality of canada, and a Player of andrew macwilliam?"
},
{
"role": "assistant",
"content": "SELECT \"club_team\" FROM \"draft_picks\" WHERE \"position\"='(d)' AND \"nationality\"='canada' AND \"player\"='andrew macwilliam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: How much money did jodie mudd get?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"player\"='jodie mudd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What score did Australia get?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"country\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"puerperal_fever_mortality_rates_for_birt\" (\n \"month\" text,\n \"births\" text,\n \"deaths\" text,\n \"rate_pct\" text,\n \"sort_restore\" real\n);\n\nQuestion: What is the sort value that had deaths of 71?"
},
{
"role": "assistant",
"content": "SELECT \"sort_restore\" FROM \"puerperal_fever_mortality_rates_for_birt\" WHERE \"deaths\"='71';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"puerperal_fever_mortality_rates_for_birt\" (\n \"month\" text,\n \"births\" text,\n \"deaths\" text,\n \"rate_pct\" text,\n \"sort_restore\" real\n);\n\nQuestion: Which month had a sort value under 39 and 2 deaths?"
},
{
"role": "assistant",
"content": "SELECT \"month\" FROM \"puerperal_fever_mortality_rates_for_birt\" WHERE \"sort_restore\"<39 AND \"deaths\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"puerperal_fever_mortality_rates_for_birt\" (\n \"month\" text,\n \"births\" text,\n \"deaths\" text,\n \"rate_pct\" text,\n \"sort_restore\" real\n);\n\nQuestion: What is the number of sort values associated with 389 births?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"sort_restore\") FROM \"puerperal_fever_mortality_rates_for_birt\" WHERE \"births\"='389';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Who was the Manufacturer for the Rider Colin Edwards?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"rider\"='colin edwards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: With a Grid less than 15, and a Time of +52.833, what is the highest number of Laps?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\"<15 AND \"time\"='+52.833';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average Grid for the Rider Toni Elias with Laps more than 30?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"moto_gp_classification\" WHERE \"rider\"='toni elias' AND \"laps\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: With a Time of +1:37.055, which has the lowest Grid?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"moto_gp_classification\" WHERE \"time\"='+1:37.055';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invitational_sports\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Silver is the highest one that has a Rank of 19, and a Gold larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"invitational_sports\" WHERE \"rank\"='19' AND \"gold\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invitational_sports\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze is the highest one that has a Rank of 26, and a Total larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"invitational_sports\" WHERE \"rank\"='26' AND \"total\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invitational_sports\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Gold has a Nation of india, and a Bronze smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"invitational_sports\" WHERE \"nation\"='india' AND \"bronze\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invitational_sports\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Nation has a Gold larger than 0, and a Bronze smaller than 2, and a Total larger than 3, and a Silver larger than 1?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"invitational_sports\" WHERE \"gold\">0 AND \"bronze\"<2 AND \"total\">3 AND \"silver\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the round number when the record is 15\u20137\u20131?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='15\u20137\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the method when the time is 5:00, and the record is 14\u20136\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"record\"='14\u20136\u20131';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the home team of the game with a price decision and the new jersey devils as the visitor team?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"decision\"='price' AND \"visitor\"='new jersey devils';"
}
] |
[
{
"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 \"nets_points\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the record on November 7, when the opponent score was less than 99?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"opponent_score\"<99 AND \"date\"='november 7';"
}
] |
[
{
"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 \"nets_points\" real,\n \"opponent_score\" real,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: When the opponent scored 96 points after game 61, what was the streak?"
},
{
"role": "assistant",
"content": "SELECT \"streak\" FROM \"schedule\" WHERE \"game\">61 AND \"opponent_score\"=96;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What transfer fee did Birmingham City get on 30 June 2010?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"in\" WHERE \"ends\"='30 june 2010' AND \"moving_from\"='birmingham city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What type of move was Elding from ENG?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"in\" WHERE \"country\"='eng' AND \"name\"='elding';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: When does Donaldson's move end?"
},
{
"role": "assistant",
"content": "SELECT \"ends\" FROM \"in\" WHERE \"name\"='donaldson';"
}
] |
[
{
"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: Which Silver has a Total of 7, and a Gold larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"total\"=7 AND \"gold\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Gold smaller than 16, a Rank of 10, and a Nation of italy?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<16 AND \"rank\"='10' AND \"nation\"='italy';"
}
] |
[
{
"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: Which Total has a Bronze larger than 2, a Gold smaller than 16, a Silver of 0, and a Rank of 13?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"bronze\">2 AND \"gold\"<16 AND \"silver\"=0 AND \"rank\"='13';"
}
] |
[
{
"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: Which Gold has a Nation of malaysia, and a Silver smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"nation\"='malaysia' AND \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"states_of_brazil\" (\n \"state\" text,\n \"abbreviation\" text,\n \"capital\" text,\n \"area_km\" real,\n \"population_2005\" real,\n \"density_2005\" real,\n \"gdp_pct_total_2004\" text,\n \"gdp_per_capita_us_2004\" real,\n \"hdi_2005\" real,\n \"literacy_2003\" text,\n \"infant_mortality_2002\" text,\n \"life_expectancy_2004\" real\n);\n\nQuestion: Which Population (2005) has a Literacy (2003) of 90%, and an Infant Mortality (2002) of 18.3\u2030?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population_2005\") FROM \"states_of_brazil\" WHERE \"literacy_2003\"='90%' AND \"infant_mortality_2002\"='18.3\u2030';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"states_of_brazil\" (\n \"state\" text,\n \"abbreviation\" text,\n \"capital\" text,\n \"area_km\" real,\n \"population_2005\" real,\n \"density_2005\" real,\n \"gdp_pct_total_2004\" text,\n \"gdp_per_capita_us_2004\" real,\n \"hdi_2005\" real,\n \"literacy_2003\" text,\n \"infant_mortality_2002\" text,\n \"life_expectancy_2004\" real\n);\n\nQuestion: Which Density (2005) has an Area (km\u00b2) of 340086.7, and a Population (2005) smaller than 5926300?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"density_2005\") FROM \"states_of_brazil\" WHERE \"area_km\"=340086.7 AND \"population_2005\"<5926300;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"states_of_brazil\" (\n \"state\" text,\n \"abbreviation\" text,\n \"capital\" text,\n \"area_km\" real,\n \"population_2005\" real,\n \"density_2005\" real,\n \"gdp_pct_total_2004\" text,\n \"gdp_per_capita_us_2004\" real,\n \"hdi_2005\" real,\n \"literacy_2003\" text,\n \"infant_mortality_2002\" text,\n \"life_expectancy_2004\" real\n);\n\nQuestion: Which GDP per capita (US$) (2004) is the highest one that has an Area (km\u00b2) larger than 148825.6, and a State of roraima?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gdp_per_capita_us_2004\") FROM \"states_of_brazil\" WHERE \"area_km\">148825.6 AND \"state\"='roraima';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"states_of_brazil\" (\n \"state\" text,\n \"abbreviation\" text,\n \"capital\" text,\n \"area_km\" real,\n \"population_2005\" real,\n \"density_2005\" real,\n \"gdp_pct_total_2004\" text,\n \"gdp_per_capita_us_2004\" real,\n \"hdi_2005\" real,\n \"literacy_2003\" text,\n \"infant_mortality_2002\" text,\n \"life_expectancy_2004\" real\n);\n\nQuestion: Which Literacy (2003) has an HDI (2005) smaller than 0.718, and a GDP per capita (US$) (2004) smaller than 3877, and a State of maranh\u00e3o?"
},
{
"role": "assistant",
"content": "SELECT \"literacy_2003\" FROM \"states_of_brazil\" WHERE \"hdi_2005\"<0.718 AND \"gdp_per_capita_us_2004\"<3877 AND \"state\"='maranh\u00e3o';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"states_of_brazil\" (\n \"state\" text,\n \"abbreviation\" text,\n \"capital\" text,\n \"area_km\" real,\n \"population_2005\" real,\n \"density_2005\" real,\n \"gdp_pct_total_2004\" text,\n \"gdp_per_capita_us_2004\" real,\n \"hdi_2005\" real,\n \"literacy_2003\" text,\n \"infant_mortality_2002\" text,\n \"life_expectancy_2004\" real\n);\n\nQuestion: Which GDP per capita (US$) (2004) has a Literacy (2003) of 90%, and an Area (km\u00b2) of 1247689.5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gdp_per_capita_us_2004\") FROM \"states_of_brazil\" WHERE \"literacy_2003\"='90%' AND \"area_km\"=1247689.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_points_leaders\" (\n \"total_points\" real,\n \"name\" text,\n \"career_games\" text,\n \"position\" text,\n \"years_played\" text,\n \"scored_1_500_points\" text,\n \"date_and_opponent\" text\n);\n\nQuestion: Name the Date and an Opponent which has a f Position and Career Games of 123 games?"
},
{
"role": "assistant",
"content": "SELECT \"date_and_opponent\" FROM \"career_points_leaders\" WHERE \"position\"='f' AND \"career_games\"='123 games';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_points_leaders\" (\n \"total_points\" real,\n \"name\" text,\n \"career_games\" text,\n \"position\" text,\n \"years_played\" text,\n \"scored_1_500_points\" text,\n \"date_and_opponent\" text\n);\n\nQuestion: Which Name has a Years Played of 2004\u20132008, and a Date and Opponent of 2/17/07 vs. purdue?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"career_points_leaders\" WHERE \"years_played\"='2004\u20132008' AND \"date_and_opponent\"='2/17/07 vs. purdue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_points_leaders\" (\n \"total_points\" real,\n \"name\" text,\n \"career_games\" text,\n \"position\" text,\n \"years_played\" text,\n \"scored_1_500_points\" text,\n \"date_and_opponent\" text\n);\n\nQuestion: Which Career Games has a Scored 1,500 Points of sr./92nd game?"
},
{
"role": "assistant",
"content": "SELECT \"career_games\" FROM \"career_points_leaders\" WHERE \"scored_1_500_points\"='sr./92nd game';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_points_leaders\" (\n \"total_points\" real,\n \"name\" text,\n \"career_games\" text,\n \"position\" text,\n \"years_played\" text,\n \"scored_1_500_points\" text,\n \"date_and_opponent\" text\n);\n\nQuestion: Which Career Games has a Date and Opponent of 12/15/92 vs. uw\u2013milwaukee?"
},
{
"role": "assistant",
"content": "SELECT \"career_games\" FROM \"career_points_leaders\" WHERE \"date_and_opponent\"='12/15/92 vs. uw\u2013milwaukee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_points_leaders\" (\n \"total_points\" real,\n \"name\" text,\n \"career_games\" text,\n \"position\" text,\n \"years_played\" text,\n \"scored_1_500_points\" text,\n \"date_and_opponent\" text\n);\n\nQuestion: WHich Scored 1,500 Points has a Years Played of 2004\u20132008 and a Name of jolene anderson?"
},
{
"role": "assistant",
"content": "SELECT \"scored_1_500_points\" FROM \"career_points_leaders\" WHERE \"years_played\"='2004\u20132008' AND \"name\"='jolene anderson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Time has a Round smaller than 3, and an Opponent of bao quach?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"opponent\"='bao quach';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Round has a Record of 10-6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='10-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Opponent has a Round smaller than 3, and a Time of 1:09?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"time\"='1:09';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Time has an Opponent of josh branham?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='josh branham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Time has a Round larger than 2, and an Opponent of jesse brock?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"round\">2 AND \"opponent\"='jesse brock';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: Which Round has an Event of nle - capital city carnage?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='nle - capital city carnage';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: Which Round has an Opponent of ryan bixler?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='ryan bixler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: Which Event has a Record of 19-9?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='19-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Method has a Round of 1, and a Record of 4\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"record\"='4\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Opponent has a Time of 4:51?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='4:51';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Round has an Opponent of jorge magalhaes?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jorge magalhaes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Round has a Location of bahia, brazil?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"location\"='bahia, brazil';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Opponent has an Event of jungle fight 5?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='jungle fight 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Tiger Woods with a total less than 293 had what To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"total\"<293 AND \"player\"='tiger woods';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Bernhard Langer maximum total was what?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"made_the_cut\" WHERE \"player\"='bernhard langer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the average of the total when t11 is the finish?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Rider has Laps smaller than 24, and a Grid smaller than 12, and a Manufacturer of aprilia?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"125cc_classification\" WHERE \"laps\"<24 AND \"grid\"<12 AND \"manufacturer\"='aprilia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What were grid 7's laps?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"125cc_classification\" WHERE \"grid\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Time/Retired has Laps smaller than 24, and a Manufacturer of aprilia, and a Grid smaller than 12, and a Rider of \u00e1ngel rodr\u00edguez?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"125cc_classification\" WHERE \"laps\"<24 AND \"manufacturer\"='aprilia' AND \"grid\"<12 AND \"rider\"='\u00e1ngel rodr\u00edguez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many Laps have a Time/Retired of +1:42.517, and a Grid larger than 33?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"125cc_classification\" WHERE \"time_retired\"='+1:42.517' AND \"grid\">33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: Which chassis-engine had 77 laps?"
},
{
"role": "assistant",
"content": "SELECT \"chassis_engine\" FROM \"official_results\" WHERE \"laps\"=77;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: What is the class of team liqui moly equipe, which has less than 71 laps?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"official_results\" WHERE \"laps\"<71 AND \"team\"='liqui moly equipe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: What is the team of driver klaus ludwig, who is class c1 and has more than 77 laps?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"official_results\" WHERE \"class\"='c1' AND \"laps\">77 AND \"driver\"='klaus ludwig';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: Who is the driver of the chassis-engine porsche 956 gti?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"official_results\" WHERE \"chassis_engine\"='porsche 956 gti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: What team has a porsche 956 b chassis-engine with less than 79 laps?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"official_results\" WHERE \"chassis_engine\"='porsche 956 b' AND \"laps\"<79;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.