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 \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the number of goals against when the played is more than 38?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_against\") FROM \"group_ii\" WHERE \"played\">38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the number of draws when played is less than 38?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draws\") FROM \"group_ii\" WHERE \"played\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the points when played is less than 38?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"group_ii\" WHERE \"played\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which Transfer window has a Name of tofas?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"squad_changes\" WHERE \"name\"='tofas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which Type has a Transfer fee of free, and a Name of kapetanos?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"squad_changes\" WHERE \"transfer_fee\"='free' AND \"name\"='kapetanos';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which Type has a Name of edson ratinho?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"squad_changes\" WHERE \"name\"='edson ratinho';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Which Name has a Type of loan, and a Moving to of apollon kalamaria?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"squad_changes\" WHERE \"type\"='loan' AND \"moving_to\"='apollon kalamaria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_and_results\" (\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text\n);\n\nQuestion: What is Location, when Circuit is August 16?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"calendar_and_results\" WHERE \"circuit\"='august 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_and_results\" (\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text\n);\n\nQuestion: What is Location, when Fastest Lap is Ben Spies, when Pole Position is Ben Spies, when Winner is Ben Spies, and when Date is Tooele, Utah?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"calendar_and_results\" WHERE \"fastest_lap\"='ben spies' AND \"pole_position\"='ben spies' AND \"winner\"='ben spies' AND \"date\"='tooele, utah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_and_results\" (\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text\n);\n\nQuestion: What is Fastest Lap, when Date is Leeds, Alabama, and when Circuit is April 19?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"calendar_and_results\" WHERE \"date\"='leeds, alabama' AND \"circuit\"='april 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_and_results\" (\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text\n);\n\nQuestion: What is Winner, when Circuit is June 8?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"calendar_and_results\" WHERE \"circuit\"='june 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_and_results\" (\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text\n);\n\nQuestion: What is Pole Position, when Fastest Lap is Ben Spies, and when Location is Barber Motorsports Park?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"calendar_and_results\" WHERE \"fastest_lap\"='ben spies' AND \"location\"='barber motorsports park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar_and_results\" (\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text\n);\n\nQuestion: What is Winner, when Pole Position is Ben Spies, and when Date is Elkhart Lake, Wisconsin?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"calendar_and_results\" WHERE \"pole_position\"='ben spies' AND \"date\"='elkhart lake, wisconsin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12_6_6\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Surface of the court in the match with a Score of 4\u20136, 6\u20134, 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_12_6_6\" WHERE \"score\"='4\u20136, 6\u20134, 3\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which Team has a Year larger than 2010?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\">2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which Laps has a Year of 2007?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"year\"=2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the tie number with the home team of Swindon Town?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"home_team\"='swindon town';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the tie number with the away team of Sheffield Wednesday?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"away_team\"='sheffield wednesday';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score for the match with tie number 23?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round_proper\" WHERE \"tie_no\"='23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the home team for the match against Arsenal?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='arsenal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which player has United States as the country, more money ($) than 535,000, t10 as the place, with 73-68-73-74=288 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"country\"='united states' AND \"money\">'535,000' AND \"place\"='t10' AND \"score\"='73-68-73-74=288';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which place is payne stewart, the player in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"player\"='payne stewart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What player has +7 as the to par, and 69-69-75-74=287 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"to_par\"='+7' AND \"score\"='69-69-75-74=287';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which tournaments was Ryan Palmer in as a runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"pga_tour_8\" WHERE \"runner_s_up\"='ryan palmer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory for the Players Championship tournament?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_8\" WHERE \"tournament\"='the players championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What tournament was Kirk Triplett a runner-up in?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"pga_tour_8\" WHERE \"runner_s_up\"='kirk triplett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the winning score for the B.C. Open 1 tournament?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_8\" WHERE \"tournament\"='b.c. open 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Lee Janzen from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='lee janzen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: When Tom Watson placed t6, what was the 2 par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='t6' AND \"player\"='tom watson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who had a score of 70-69-70=209?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='70-69-70=209';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the Opponent in the Tarragona Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_12_8\" WHERE \"tournament\"='tarragona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What Tournament's Score was 6\u20132, 4\u20136, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_12_8\" WHERE \"score\"='6\u20132, 4\u20136, 6\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_8\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: On what Date was the match with a Score of 6-2, 6-4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_12_8\" WHERE \"score\"='6-2, 6-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_honors\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: How many years had the best actress in a Revival category?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"awards_and_honors\" WHERE \"category\"='best actress in a revival';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_honors\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What categories had a Nominated work of yerma before 1992?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_honors\" WHERE \"year\"<1992 AND \"nominated_work\"='yerma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"english_gun_classes_c_1800_citation_need\" (\n \"gun_class_pdr\" real,\n \"shot_diameter_cm\" real,\n \"shot_volume_cm_3\" real,\n \"approx_service_bore_cm\" real,\n \"mass_of_projectile_kg\" real\n);\n\nQuestion: How many times is the shot volume (cm3) less than 172.76?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"shot_diameter_cm\") FROM \"english_gun_classes_c_1800_citation_need\" WHERE \"shot_volume_cm_3\"<172.76;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"english_gun_classes_c_1800_citation_need\" (\n \"gun_class_pdr\" real,\n \"shot_diameter_cm\" real,\n \"shot_volume_cm_3\" real,\n \"approx_service_bore_cm\" real,\n \"mass_of_projectile_kg\" real\n);\n\nQuestion: what is the average shot volume (cm 3) when the shot diameter (cm) is less than 6.04?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"shot_volume_cm_3\") FROM \"english_gun_classes_c_1800_citation_need\" WHERE \"shot_diameter_cm\"<6.04;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"nominated_won\" text,\n \"award_category\" text,\n \"festival_organization\" text,\n \"role\" text\n);\n\nQuestion: What role was nominated at the Sydney Film Festival?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"awards_and_nominations\" WHERE \"festival_organization\"='sydney film festival';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"nominated_won\" text,\n \"award_category\" text,\n \"festival_organization\" text,\n \"role\" text\n);\n\nQuestion: In what category was an award won in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"award_category\" FROM \"awards_and_nominations\" WHERE \"nominated_won\"='won' AND \"year\"=2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"nominated_won\" text,\n \"award_category\" text,\n \"festival_organization\" text,\n \"role\" text\n);\n\nQuestion: What is the first year that there was a Satellite Award?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"awards_and_nominations\" WHERE \"festival_organization\"='satellite award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"nominated_won\" text,\n \"award_category\" text,\n \"festival_organization\" text,\n \"role\" text\n);\n\nQuestion: What role was at the Sydney Film Festival in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"awards_and_nominations\" WHERE \"year\"=2008 AND \"festival_organization\"='sydney film festival';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"nominated_won\" text,\n \"award_category\" text,\n \"festival_organization\" text,\n \"role\" text\n);\n\nQuestion: What was nominated for the Jury Award?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_won\" FROM \"awards_and_nominations\" WHERE \"award_category\"='jury award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"series_sorted\" text,\n \"title\" text,\n \"doctor\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: what is the released when the series is sorted 6y/ai?"
},
{
"role": "assistant",
"content": "SELECT \"released\" FROM \"series_3\" WHERE \"series_sorted\"='6y/ai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"series_sorted\" text,\n \"title\" text,\n \"doctor\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: who is the featuring when the doctor is the 6th and the series sorted is 6y/ak?"
},
{
"role": "assistant",
"content": "SELECT \"featuring\" FROM \"series_3\" WHERE \"doctor\"='6th' AND \"series_sorted\"='6y/ak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"series_sorted\" text,\n \"title\" text,\n \"doctor\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: what is the series sorted when the released is may 2012?"
},
{
"role": "assistant",
"content": "SELECT \"series_sorted\" FROM \"series_3\" WHERE \"released\"='may 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"series_sorted\" text,\n \"title\" text,\n \"doctor\" text,\n \"featuring\" text,\n \"released\" text\n);\n\nQuestion: who is the featuring when the series sorted is 6eb/b?"
},
{
"role": "assistant",
"content": "SELECT \"featuring\" FROM \"series_3\" WHERE \"series_sorted\"='6eb/b';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which Country has a Year(s) won of 1977?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"year_s_won\"='1977';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which To par is the lowest one that has a Year(s) won of 1962, 1967, 1972, 1980, and a Total larger than 149?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"to_par\") FROM \"missed_the_cut\" WHERE \"year_s_won\"='1962, 1967, 1972, 1980' AND \"total\">149;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which Country has a Total of 148?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"total\"=148;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which Year(s) won has a Total of 147?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"total\"=147;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which To par is the highest one that has a Total smaller than 148?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"to_par\") FROM \"missed_the_cut\" WHERE \"total\"<148;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_presidential_elections\" (\n \"election\" text,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: Who is the candidate in the 2008 (2) election?"
},
{
"role": "assistant",
"content": "SELECT \"candidate\" FROM \"table_presidential_elections\" WHERE \"election\"='2008 (2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_presidential_elections\" (\n \"election\" text,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: What is the share of votes in the 2008 (1) election?"
},
{
"role": "assistant",
"content": "SELECT \"share_of_votes\" FROM \"table_presidential_elections\" WHERE \"election\"='2008 (1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_presidential_elections\" (\n \"election\" text,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: What is the share of votes in the 2000 (2nd) election?"
},
{
"role": "assistant",
"content": "SELECT \"share_of_votes\" FROM \"table_presidential_elections\" WHERE \"election\"='2000 (2nd)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_presidential_elections\" (\n \"election\" text,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: What is the election with an outcome of ndc opposition and 2,728,241 votes?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"table_presidential_elections\" WHERE \"outcome_of_election\"='ndc opposition' AND \"number_of_votes\"='2,728,241';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_presidential_elections\" (\n \"election\" text,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: What is the outcome of the election with 43.3% share of votes?"
},
{
"role": "assistant",
"content": "SELECT \"outcome_of_election\" FROM \"table_presidential_elections\" WHERE \"share_of_votes\"='43.3%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_presidential_elections\" (\n \"election\" text,\n \"candidate\" text,\n \"number_of_votes\" text,\n \"share_of_votes\" text,\n \"outcome_of_election\" text\n);\n\nQuestion: Who is the candidate in the 2012 election?"
},
{
"role": "assistant",
"content": "SELECT \"candidate\" FROM \"table_presidential_elections\" WHERE \"election\"='2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is Mark O'Meara's Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='mark o''meara';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is Curtis Strange's Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='curtis strange';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" real,\n \"tracks\" text,\n \"length\" text,\n \"label\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog number of the CBS Track \"It's Automatic\"?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"label\"='cbs' AND \"tracks\"='\\\"it''s automatic\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" real,\n \"tracks\" text,\n \"length\" text,\n \"label\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Tracks of the release in Catalog BA 222304 with a Length of 2:57?"
},
{
"role": "assistant",
"content": "SELECT \"tracks\" FROM \"release_history\" WHERE \"catalog\"='ba 222304' AND \"length\"='2:57';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" real,\n \"tracks\" text,\n \"length\" text,\n \"label\" text,\n \"catalog\" text\n);\n\nQuestion: On what Date did Columbia release the Track \"Do it again\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"date\") FROM \"release_history\" WHERE \"label\"='columbia' AND \"tracks\"='\\\"do it again\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"match_no\" real,\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"venue\" text,\n \"match_report\" text\n);\n\nQuestion: What is the highest Match No., when Date is 2008-03-21, and when Time is 16:00?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"match_no\") FROM \"group_2\" WHERE \"date\"='2008-03-21' AND \"time\"='16:00';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What was the venue for runs 325/6?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_team_totals_against\" WHERE \"runs\"='325/6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What season were the runs 310/9?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"highest_team_totals_against\" WHERE \"runs\"='310/9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_team_totals_against\" (\n \"rank\" text,\n \"runs\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What were the runs for the opponent from the West Indies?"
},
{
"role": "assistant",
"content": "SELECT \"runs\" FROM \"highest_team_totals_against\" WHERE \"opponent\"='west indies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Place has a Country of united states, and Money ($) larger than 145,000, and a To par of \u20132, and a Score of 70-66-73-69=278?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"country\"='united states' AND \"money\">'145,000' AND \"to_par\"='\u20132' AND \"score\"='70-66-73-69=278';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Money ($) has a Score of 70-66-73-69=278?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"money\") FROM \"final_round\" WHERE \"score\"='70-66-73-69=278';"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: How many rounds did the match last with Sam Sotello as the opponent?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='sam sotello';"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: What is the record for the loss in UFC 62?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"event\"='ufc 62';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_7\" (\n \"subclass\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the part 4 with *heguldun *febungun in part 3?"
},
{
"role": "assistant",
"content": "SELECT \"part_4\" FROM \"class_7\" WHERE \"part_3\"='*heguldun *febungun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_7\" (\n \"subclass\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the part 3 with *hegait in part 2?"
},
{
"role": "assistant",
"content": "SELECT \"part_3\" FROM \"class_7\" WHERE \"part_2\"='*hegait';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_7\" (\n \"subclass\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the part 4 with *hlaupan\u0105 *stautan\u0105 in part 1?"
},
{
"role": "assistant",
"content": "SELECT \"part_4\" FROM \"class_7\" WHERE \"part_1\"='*hlaupan\u0105 *stautan\u0105';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_7\" (\n \"subclass\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the verb meaning of *haldan\u0105 *fanhan\u0105 in part 1?"
},
{
"role": "assistant",
"content": "SELECT \"verb_meaning\" FROM \"class_7\" WHERE \"part_1\"='*haldan\u0105 *fanhan\u0105';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belgium_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: Who is sezen aksu's producer?"
},
{
"role": "assistant",
"content": "SELECT \"producer_s\" FROM \"belgium_cd_track_listings\" WHERE \"songwriter_s\"='sezen aksu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belgium_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: Which Title has a Songwriter(s) of hadise a\u00e7\u0131kg\u00f6z, stefaan fernande, elio deepcore?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"belgium_cd_track_listings\" WHERE \"songwriter_s\"='hadise a\u00e7\u0131kg\u00f6z, stefaan fernande, elio deepcore';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belgium_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: Which Title has a Length of 3:32, and a Producer(s) of hadise a\u00e7\u0131kg\u00f6z, yves jongen?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"belgium_cd_track_listings\" WHERE \"length\"='3:32' AND \"producer_s\"='hadise a\u00e7\u0131kg\u00f6z, yves jongen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belgium_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: Which Producer(s) has a Track smaller than 8, and a Songwriter(s) of hadise a\u00e7\u0131kg\u00f6z, yves jongen, and a Length of 3:08?"
},
{
"role": "assistant",
"content": "SELECT \"producer_s\" FROM \"belgium_cd_track_listings\" WHERE \"track\"<8 AND \"songwriter_s\"='hadise a\u00e7\u0131kg\u00f6z, yves jongen' AND \"length\"='3:08';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belgium_cd_track_listings\" (\n \"track\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"producer_s\" text,\n \"length\" text\n);\n\nQuestion: What is track 6's title?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"belgium_cd_track_listings\" WHERE \"track\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"hardware_model\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What company makes the Nokia 700?"
},
{
"role": "assistant",
"content": "SELECT \"company_name\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"hardware_model\"='nokia 700';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"hardware_model\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What is the accreditation level for the approved (awarded 05.12.12) date?"
},
{
"role": "assistant",
"content": "SELECT \"accreditation_level\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"date\"='approved (awarded 05.12.12)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"hardware_model\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: When did Samsung Electronics Co LTD make the GT-i9100?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"company_name\"='samsung electronics co ltd' AND \"hardware_model\"='gt-i9100';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"hardware_model\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: When the Nokia corporation had an accreditation level of joyn, what was the accreditation type?"
},
{
"role": "assistant",
"content": "SELECT \"accreditation_type\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"accreditation_level\"='joyn' AND \"company_name\"='nokia corporation';"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: What is Round, when Record is \"4-1\"?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-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\" text,\n \"location\" text\n);\n\nQuestion: What is Opponent, when Location is \"Tokyo , Japan\", when Method is \"Decision (unanimous)\", and when Record is \"4-1\"?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='tokyo , japan' AND \"method\"='decision (unanimous)' AND \"record\"='4-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\" text,\n \"location\" text\n);\n\nQuestion: What is Method, when Opponent is \"Thiago Alves\"?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='thiago alves';"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: What is Event, when Round is \"1\", when Location is \"Osaka , Japan\", and when Method is \"TKO (corner stoppage)\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='1' AND \"location\"='osaka , japan' AND \"method\"='tko (corner stoppage)';"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: What is Record, when Event is \"UFC 64\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 64';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for a game smaller than 24, Lundqvist was the decision, November less than 8, and opponent Was New York Islanders?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"game\"<24 AND \"decision\"='lundqvist' AND \"november\"<8 AND \"opponent\"='new york islanders';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the smallest game number with a record of 16-7-2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"schedule_and_results\" WHERE \"record\"='16-7-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of the game with a decision of Lundqvist, the November less than 28, and opponent was Boston Bruins?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"decision\"='lundqvist' AND \"november\"<28 AND \"opponent\"='boston bruins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Where was the 2013 Eaff East Asian Cup Qualifier played?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='2013 eaff east asian cup qualifier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groupe_a\" (\n \"rank\" real,\n \"club\" text,\n \"points\" real,\n \"played\" real,\n \"victories\" real,\n \"draws\" real,\n \"defeats\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_average\" real\n);\n\nQuestion: What is the highest amount of points with a goal average larger than 4, less than 12 draws, and a goal of 63?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"groupe_a\" WHERE \"goal_average\">4 AND \"draws\"<12 AND \"goals_for\"=63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groupe_a\" (\n \"rank\" real,\n \"club\" text,\n \"points\" real,\n \"played\" real,\n \"victories\" real,\n \"draws\" real,\n \"defeats\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_average\" real\n);\n\nQuestion: What is the lowest goal for a goal against 37 and less than 15 victories?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_for\") FROM \"groupe_a\" WHERE \"goals_against\"=37 AND \"victories\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groupe_a\" (\n \"rank\" real,\n \"club\" text,\n \"points\" real,\n \"played\" real,\n \"victories\" real,\n \"draws\" real,\n \"defeats\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_average\" real\n);\n\nQuestion: How many goals on average are there for rank 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_for\") FROM \"groupe_a\" WHERE \"rank\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"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 average goals against when there are more than 42 played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_against\") FROM \"final_table\" WHERE \"played\">42;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"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 for the team from Chorley?"
},
{
"role": "assistant",
"content": "SELECT \"goal_difference\" FROM \"final_table\" WHERE \"team\"='chorley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is T8 Place Player Scott Hoch's Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"place\"='t8' AND \"player\"='scott hoch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the Place of the Player with a Score of 67-76-74-67=284?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='67-76-74-67=284';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the Money of the Player with a Score of 69-71-69-72=281?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"score\"='69-71-69-72=281';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.