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 \"tallest_buildings_and_structures\" (\n \"rank\" text,\n \"name\" text,\n \"height_metres_ft\" text,\n \"floors\" text,\n \"year\" real\n);\n\nQuestion: What ranking is the structure with 01.0 87 floors?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"tallest_buildings_and_structures\" WHERE \"floors\"='01.0 87';"
}
]
|
[
{
"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 \"raiders_points\" real,\n \"opponents\" real,\n \"raiders_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest Attendance, when Date is \"Oct. 26\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"date\"='oct. 26';"
}
]
|
[
{
"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 \"raiders_points\" real,\n \"opponents\" real,\n \"raiders_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest Opponents, when Raiders Poinsts is greater than 38, and when Attendance is greater than 51,267?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"opponents\") FROM \"schedule\" WHERE \"raiders_points\">38 AND \"attendance\">'51,267';"
}
]
|
[
{
"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 \"raiders_points\" real,\n \"opponents\" real,\n \"raiders_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total number of Opponents, when Raiders Points is \"42\", when Attendance is less than 52,505?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponents\") FROM \"schedule\" WHERE \"raiders_points\"=42 AND \"attendance\"<'52,505';"
}
]
|
[
{
"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 \"raiders_points\" real,\n \"opponents\" real,\n \"raiders_first_downs\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total number of Raiders First Downs, when Date is \"Nov. 2\", and when Raiders Points is greater than 42?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"raiders_first_downs\") FROM \"schedule\" WHERE \"date\"='nov. 2' AND \"raiders_points\">42;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is the average Tournaments, when Highest Rank is \"Maegashira 1\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"tournaments\") FROM \"fastest_progress_to_top_division\" WHERE \"highest_rank\"='maegashira 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is Top Division Debut, when Tournaments is \"12\", and when Name is \"Yamamotoyama\"?"
},
{
"role": "assistant",
"content": "SELECT \"top_division_debut\" FROM \"fastest_progress_to_top_division\" WHERE \"tournaments\"=12 AND \"name\"='yamamotoyama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is the lowest Tournaments, when Name is \"Baruto\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tournaments\") FROM \"fastest_progress_to_top_division\" WHERE \"name\"='baruto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is the highest Tournaments, when Pro Debut is \"July 2002\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tournaments\") FROM \"fastest_progress_to_top_division\" WHERE \"pro_debut\"='july 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fastest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is Pro Debut, when Tournament is greater than 11, and when Highest Rank is \"Maegashira 1\"?"
},
{
"role": "assistant",
"content": "SELECT \"pro_debut\" FROM \"fastest_progress_to_top_division\" WHERE \"tournaments\">11 AND \"highest_rank\"='maegashira 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many League Cup Goals have 0 as the total goals, with delroy facey as the name?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"league_cup_goals\") FROM \"appearances_and_goals\" WHERE \"total_goals\"=0 AND \"name\"='delroy facey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many total goals have 0 (3) as total apps, with league goals less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"total_apps\"='0 (3)' AND \"league_goals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the lowest league goals that have 0 as the FA Cup Apps, with 1 (3) as totals apps?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\"='0' AND \"total_apps\"='1 (3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"juries\" (\n \"song\" text,\n \"international_jury\" text,\n \"lule\" text,\n \"ume\" text,\n \"sundsvall\" text,\n \"falun\" text,\n \"karlstad\" text,\n \"rebro\" text,\n \"norrk_ping\" text,\n \"g_teborg\" text,\n \"v_xj\" text,\n \"malm\" text,\n \"stockholm\" text,\n \"total\" real\n);\n\nQuestion: What was Stockholm's score when Malmo scored 2?"
},
{
"role": "assistant",
"content": "SELECT \"stockholm\" FROM \"juries\" WHERE \"malm\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"juries\" (\n \"song\" text,\n \"international_jury\" text,\n \"lule\" text,\n \"ume\" text,\n \"sundsvall\" text,\n \"falun\" text,\n \"karlstad\" text,\n \"rebro\" text,\n \"norrk_ping\" text,\n \"g_teborg\" text,\n \"v_xj\" text,\n \"malm\" text,\n \"stockholm\" text,\n \"total\" real\n);\n\nQuestion: What did Vaxjo score when Karlstad scored 1?"
},
{
"role": "assistant",
"content": "SELECT \"v_xj\" FROM \"juries\" WHERE \"karlstad\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"juries\" (\n \"song\" text,\n \"international_jury\" text,\n \"lule\" text,\n \"ume\" text,\n \"sundsvall\" text,\n \"falun\" text,\n \"karlstad\" text,\n \"rebro\" text,\n \"norrk_ping\" text,\n \"g_teborg\" text,\n \"v_xj\" text,\n \"malm\" text,\n \"stockholm\" text,\n \"total\" real\n);\n\nQuestion: What did Sundsvall score when Falun scored 2?"
},
{
"role": "assistant",
"content": "SELECT \"sundsvall\" FROM \"juries\" WHERE \"falun\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"juries\" (\n \"song\" text,\n \"international_jury\" text,\n \"lule\" text,\n \"ume\" text,\n \"sundsvall\" text,\n \"falun\" text,\n \"karlstad\" text,\n \"rebro\" text,\n \"norrk_ping\" text,\n \"g_teborg\" text,\n \"v_xj\" text,\n \"malm\" text,\n \"stockholm\" text,\n \"total\" real\n);\n\nQuestion: What was the highest total when Norrkoping scored 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"juries\" WHERE \"norrk_ping\"='12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"juries\" (\n \"song\" text,\n \"international_jury\" text,\n \"lule\" text,\n \"ume\" text,\n \"sundsvall\" text,\n \"falun\" text,\n \"karlstad\" text,\n \"rebro\" text,\n \"norrk_ping\" text,\n \"g_teborg\" text,\n \"v_xj\" text,\n \"malm\" text,\n \"stockholm\" text,\n \"total\" real\n);\n\nQuestion: What did Orebro score when Umea scored 2?"
},
{
"role": "assistant",
"content": "SELECT \"rebro\" FROM \"juries\" WHERE \"ume\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game that was attended by 80,886 people?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='80,886';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game that was attended by 72,703 people?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='72,703';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game that was attended by 41,650 people?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='41,650';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: When was the game against Indiana?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponentnum\"='indiana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which country is Brian Henninger from, who had a score larger than 69?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\">69 AND \"player\"='brian henninger';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Darren Clarke's total score?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"first_round\" WHERE \"player\"='darren clarke';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team on 9 February 1988?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"date\"='9 february 1988';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team on 30 January 1988, when the home team was Everton?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"home_team\"='everton' AND \"date\"='30 january 1988';"
}
]
|
[
{
"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: On which date was the Tie no 2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='2';"
}
]
|
[
{
"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 Tie no when Manchester United was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fourth_round_proper\" WHERE \"home_team\"='manchester united';"
}
]
|
[
{
"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 Tie no was 9?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"upcoming_fixtures_and_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"home_team\" text,\n \"away_team\" text\n);\n\nQuestion: Which away team goes against the home team Mauritius?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"upcoming_fixtures_and_results\" WHERE \"home_team\"='mauritius';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"upcoming_fixtures_and_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"home_team\" text,\n \"away_team\" text\n);\n\nQuestion: Who is the away team that goes against Team Zambia?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"upcoming_fixtures_and_results\" WHERE \"home_team\"='zambia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which away team has Tie no 3?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the away team playing at Everton?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"home_team\"='everton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the home team that Bradford City is playing against?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fifth_round_proper\" WHERE \"away_team\"='bradford city';"
}
]
|
[
{
"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 Location has a Method of decision (unanimous), and Res of win x?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='decision (unanimous)' AND \"res\"='win x';"
}
]
|
[
{
"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 Time of 0:37?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='0:37';"
}
]
|
[
{
"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 result has a Record of 16-6?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='16-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_to_1982\" (\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"additional_participants\" text,\n \"host_location_s\" text\n);\n\nQuestion: What Champion had a Score of 9\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"1972_to_1982\" WHERE \"score\"='9\u20131';"
}
]
|
[
{
"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 has 3 as the place?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"place\"='3';"
}
]
|
[
{
"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 player has t7 as the place, with tje United States as the country?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"place\"='t7' AND \"country\"='united states';"
}
]
|
[
{
"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 has hal sutton as the player?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='hal sutton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"releases\" (\n \"year\" real,\n \"artist\" text,\n \"title\" text,\n \"format\" text,\n \"type\" text\n);\n\nQuestion: Who was the artist before 2010 with a Promotional 7\" as a format?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"releases\" WHERE \"year\"<2010 AND \"format\"='promotional 7\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"releases\" (\n \"year\" real,\n \"artist\" text,\n \"title\" text,\n \"format\" text,\n \"type\" text\n);\n\nQuestion: Who was the artist after 2012 with CD, LP as the format?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"releases\" WHERE \"year\">2012 AND \"format\"='cd, lp';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"releases\" (\n \"year\" real,\n \"artist\" text,\n \"title\" text,\n \"format\" text,\n \"type\" text\n);\n\nQuestion: What year had a title of Die Shaolin Affen EP and EP as the type?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"releases\" WHERE \"type\"='ep' AND \"title\"='die shaolin affen ep';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"releases\" (\n \"year\" real,\n \"artist\" text,\n \"title\" text,\n \"format\" text,\n \"type\" text\n);\n\nQuestion: What is the title of the Misfits with a CD format?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"releases\" WHERE \"format\"='cd' AND \"artist\"='misfits';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the highest number of bronze medals for the entry with rank 2 and fewer than 3 silver medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='2' AND \"silver\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of gold medals won by Brazil for entries with more than 1 bronze medal but a total smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"total\"<4 AND \"nation\"='brazil' AND \"bronze\">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: What is the sum of silver medals for the entry with rank 3 and a total of 4 medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"total\"=4 AND \"rank\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_2001\" (\n \"7_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"2_30_pm\" text,\n \"3_30_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows for 3:30 pm when 1:00 is All My Children?"
},
{
"role": "assistant",
"content": "SELECT \"3_30_pm\" FROM \"fall_2001\" WHERE \"1_00_pm\"='all my children';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_2001\" (\n \"7_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"2_30_pm\" text,\n \"3_30_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows for 3:30 pm when 2:00 pm is local programs?"
},
{
"role": "assistant",
"content": "SELECT \"6_30_pm\" FROM \"fall_2001\" WHERE \"2_00_pm\"='local programs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_2001\" (\n \"7_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"2_30_pm\" text,\n \"3_30_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows for 3:30 pm when 1:30 pm is the bold and the beautiful?"
},
{
"role": "assistant",
"content": "SELECT \"3_30_pm\" FROM \"fall_2001\" WHERE \"1_30_pm\"='the bold and the beautiful';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_2001\" (\n \"7_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"2_30_pm\" text,\n \"3_30_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows for 3:30 pm when 1:30 pm is local programs, and a 7:00 am is local programs?"
},
{
"role": "assistant",
"content": "SELECT \"11_00_am\" FROM \"fall_2001\" WHERE \"1_30_pm\"='local programs' AND \"7_00_am\"='local programs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_2001\" (\n \"7_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"2_30_pm\" text,\n \"3_30_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows for 3:30 pm when 12:30 pm is the young and the restless?"
},
{
"role": "assistant",
"content": "SELECT \"noon\" FROM \"fall_2001\" WHERE \"12_30_pm\"='the young and the restless';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_2001\" (\n \"7_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"2_30_pm\" text,\n \"3_30_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows for 3:30 pm when 2:30 pm is local programs?"
},
{
"role": "assistant",
"content": "SELECT \"5_00_pm\" FROM \"fall_2001\" WHERE \"2_30_pm\"='local programs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"apps\" text,\n \"goals\" text\n);\n\nQuestion: What season had a goal of 1?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"statistics\" WHERE \"goals\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"apps\" text,\n \"goals\" text\n);\n\nQuestion: What club was in Netherlands and had 22 goals?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"statistics\" WHERE \"country\"='netherlands' AND \"goals\"='22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"apps\" text,\n \"goals\" text\n);\n\nQuestion: What season had Belgium and 1 goal?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"statistics\" WHERE \"country\"='belgium' AND \"goals\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"nominated_work\" text,\n \"award_s\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: Which Year has a Category of best film?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"awards\" WHERE \"category\"='best film';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Who is the incumbent from the democratic party in the washington 7 district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"washington\" WHERE \"party\"='democratic' AND \"district\"='washington 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: When was the earliest incumbent dave reichert was first elected?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_elected\") FROM \"washington\" WHERE \"incumbent\"='dave reichert';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the total of the first elected year of incumbent norm dicks?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"washington\" WHERE \"incumbent\"='norm dicks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the total of the first elected year of the incumbent from the washington 8 district?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"first_elected\") FROM \"washington\" WHERE \"district\"='washington 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: WHAT IS THE START THAT HAS A FINISH BIGGER THAN 3, FROM FORD, AFTER 1969?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"start\") FROM \"daytona_500_results\" WHERE \"finish\">3 AND \"manufacturer\"='ford' AND \"year\">1969;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: WHAT MANUFACTURER AFTER 1966 HAD A START SMALLER THAN 5, A WOOD TEAM AND FINISHED 35?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"daytona_500_results\" WHERE \"year\">1966 AND \"start\"<5 AND \"team\"='wood' AND \"finish\"=35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: WHAT WAS THE FINISH NUMBER WITH A START SMALLER THAN 20 IN 1969?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"finish\") FROM \"daytona_500_results\" WHERE \"start\"<20 AND \"year\"=1969;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"addictive_potential\" (\n \"drug\" text,\n \"mean\" real,\n \"pleasure\" real,\n \"psychological_dependence\" real,\n \"physical_dependence\" real\n);\n\nQuestion: What is the total number of Pleasure(s), when Psychological Dependence is greater than 1.9, and when Drug is \"Benzodiazepines\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pleasure\") FROM \"addictive_potential\" WHERE \"psychological_dependence\">1.9 AND \"drug\"='benzodiazepines';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"addictive_potential\" (\n \"drug\" text,\n \"mean\" real,\n \"pleasure\" real,\n \"psychological_dependence\" real,\n \"physical_dependence\" real\n);\n\nQuestion: What is the highest Psychological Dependence, when Pleasure is less than 2.3, when Drug is \"Cannabis\", and when Physical Dependence is less than 0.8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"psychological_dependence\") FROM \"addictive_potential\" WHERE \"pleasure\"<2.3 AND \"drug\"='cannabis' AND \"physical_dependence\"<0.8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"addictive_potential\" (\n \"drug\" text,\n \"mean\" real,\n \"pleasure\" real,\n \"psychological_dependence\" real,\n \"physical_dependence\" real\n);\n\nQuestion: What is the average Mean, when Drug is \"Alcohol\", and when Psychological Dependence is greater than 1.9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"mean\") FROM \"addictive_potential\" WHERE \"drug\"='alcohol' AND \"psychological_dependence\">1.9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"addictive_potential\" (\n \"drug\" text,\n \"mean\" real,\n \"pleasure\" real,\n \"psychological_dependence\" real,\n \"physical_dependence\" real\n);\n\nQuestion: What is the total number of Psychological Dependence, when Pleasure is \"2.3\", and when Mean is less than 1.9300000000000002?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"psychological_dependence\") FROM \"addictive_potential\" WHERE \"pleasure\"=2.3 AND \"mean\"<1.9300000000000002;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"addictive_potential\" (\n \"drug\" text,\n \"mean\" real,\n \"pleasure\" real,\n \"psychological_dependence\" real,\n \"physical_dependence\" real\n);\n\nQuestion: What is the sum of Pleasure, when Drug is \"LSD\", and when Psychological Dependence is greater than 1.1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pleasure\") FROM \"addictive_potential\" WHERE \"drug\"='lsd' AND \"psychological_dependence\">1.1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_teams\" (\n \"team\" text,\n \"country\" text,\n \"domestic_tournament\" text,\n \"position\" text,\n \"group\" text\n);\n\nQuestion: What Country's team is Rajasthan Royals at the 2008 Indian Premier League?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"qualified_teams\" WHERE \"domestic_tournament\"='2008 indian premier league' AND \"team\"='rajasthan royals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_teams\" (\n \"team\" text,\n \"country\" text,\n \"domestic_tournament\" text,\n \"position\" text,\n \"group\" text\n);\n\nQuestion: What is the Domestic Tournament with Chennai Super Kings Team?"
},
{
"role": "assistant",
"content": "SELECT \"domestic_tournament\" FROM \"qualified_teams\" WHERE \"team\"='chennai super kings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_teams\" (\n \"team\" text,\n \"country\" text,\n \"domestic_tournament\" text,\n \"position\" text,\n \"group\" text\n);\n\nQuestion: What is the Dolphins Group?"
},
{
"role": "assistant",
"content": "SELECT \"group\" FROM \"qualified_teams\" WHERE \"team\"='dolphins';"
}
]
|
[
{
"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: Who is the player that won in the year 1978?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"year_s_won\"='1978';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: What is the Country of the Player with a Score of 73-71-76-70=290?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='73-71-76-70=290';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: What is Lawson Little's Money ($) amount?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"player\"='lawson little';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: What is the Money ($) amount of the Player with a To par of e?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"to_par\"='e';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: What Country has a Player with Playoff Money with a Score of 72-69-73-73=287?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"money\"='playoff' AND \"score\"='72-69-73-73=287';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: What is Ben Hogan's Place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"player\"='ben hogan';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: What is the Place of the Player with a Score of 73-75-71-73=292?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"score\"='73-75-71-73=292';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many byes when there are 11 wins and fewer than 5 losses?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"byes\") FROM \"2012_ladder\" WHERE \"wins\"=11 AND \"losses\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many losses when there are less than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2012_ladder\" WHERE \"wins\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the most againsts with more than 11 losses and central murray is Nyah Nyah West Utd?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"2012_ladder\" WHERE \"central_murray\"='nyah nyah west utd' AND \"losses\">11;"
}
]
|
[
{
"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 is the To par of the player with Money of 7,750 or more?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"money\">'7,750';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"dsl_type\" text,\n \"provider\" text,\n \"resale\" text,\n \"down_up_to_kbit_s\" real,\n \"up_up_to_kbit_s\" real\n);\n\nQuestion: who is the provider when up (up to kbit/s) is 1180?"
},
{
"role": "assistant",
"content": "SELECT \"provider\" FROM \"germany\" WHERE \"up_up_to_kbit_s\"=1180;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"dsl_type\" text,\n \"provider\" text,\n \"resale\" text,\n \"down_up_to_kbit_s\" real,\n \"up_up_to_kbit_s\" real\n);\n\nQuestion: what is the highest down (up to kbits/s) when resale is yes, up ( up to kbit/s) is 1180 and provider is 1&1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"down_up_to_kbit_s\") FROM \"germany\" WHERE \"resale\"='yes' AND \"up_up_to_kbit_s\"=1180 AND \"provider\"='1&1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"dsl_type\" text,\n \"provider\" text,\n \"resale\" text,\n \"down_up_to_kbit_s\" real,\n \"up_up_to_kbit_s\" real\n);\n\nQuestion: what is the resale when the down (up to kbit/s) is 24000?"
},
{
"role": "assistant",
"content": "SELECT \"resale\" FROM \"germany\" WHERE \"down_up_to_kbit_s\"=24000;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"dsl_type\" text,\n \"provider\" text,\n \"resale\" text,\n \"down_up_to_kbit_s\" real,\n \"up_up_to_kbit_s\" real\n);\n\nQuestion: What is the average down (up to kbit/s) when the provider is willy.tel and the up (kbit/s) is more than 1984?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"down_up_to_kbit_s\") FROM \"germany\" WHERE \"provider\"='willy.tel' AND \"up_up_to_kbit_s\">1984;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many totals have a Gold larger than 0, and a Bronze smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"gold\">0 AND \"bronze\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Bronze larger than 1, and a Gold larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"gold\">0;"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What country is Eugene McDowell from?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='eugene mcdowell';"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: When was Mario Elie picked in a round before 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"draft_picks\" WHERE \"player\"='mario elie' AND \"round\"<7;"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: In what round did someone from North Carolina State get picked larger than 91?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"school_club_team\"='north carolina state' AND \"pick\">91;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"show\" text,\n \"character\" text,\n \"results\" text\n);\n\nQuestion: Which Results have a Category of the best new actor in lead role(female)?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"awards\" WHERE \"category\"='best new actor in lead role(female)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"show\" text,\n \"character\" text,\n \"results\" text\n);\n\nQuestion: What was the category in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards\" WHERE \"year\"=2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"show\" text,\n \"character\" text,\n \"results\" text\n);\n\nQuestion: Which Character has a Category of favourite naya sadasya?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"awards\" WHERE \"category\"='favourite naya sadasya';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"show\" text,\n \"character\" text,\n \"results\" text\n);\n\nQuestion: Which Show has an Award of indian television academy awards?"
},
{
"role": "assistant",
"content": "SELECT \"show\" FROM \"awards\" WHERE \"award\"='indian television academy awards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"show\" text,\n \"character\" text,\n \"results\" text\n);\n\nQuestion: What award was won after 2008?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards\" WHERE \"year\">2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"school_massacres\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text,\n \"additional_notes\" text\n);\n\nQuestion: On what Date did the massacre result with 21 Injured?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"school_massacres\" WHERE \"injured\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is City / State, when Winner is \"Rohan Onslow\", and when Circuit is \"Oran Park Raceway\"?"
},
{
"role": "assistant",
"content": "SELECT \"city_state\" FROM \"race_calendar\" WHERE \"winner\"='rohan onslow' AND \"circuit\"='oran park raceway';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.