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 \"batting_averages\" (\n \"player\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real,\n \"high_score\" real,\n \"average\" real,\n \"catches\" real,\n \"stump\" real\n);\n\nQuestion: What is the total number of runs for the player with fewer than 9 Inns?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"runs\") FROM \"batting_averages\" WHERE \"inns\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"batting_averages\" (\n \"player\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real,\n \"high_score\" real,\n \"average\" real,\n \"catches\" real,\n \"stump\" real\n);\n\nQuestion: What is the smallest average for the player with 13 matches and fewer than 7 catches?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average\") FROM \"batting_averages\" WHERE \"matches\"=13 AND \"catches\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which city is the host of the University of Texas?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"host\"='university of texas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: In which region is the Thompson-Boling arena located?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"first_and_second_rounds\" WHERE \"venue\"='thompson-boling arena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Who is the host in the city of Philadelphia?"
},
{
"role": "assistant",
"content": "SELECT \"host\" FROM \"first_and_second_rounds\" WHERE \"city\"='philadelphia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which city in the mideast region is the hot of Temple University?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"region\"='mideast' AND \"host\"='temple university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which city is the University of Montana located in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"host\"='university of montana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team score at Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who went to Geelong to play?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who did Collingwood play at home?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did an away team score 7.8 (50)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"away_team_score\"='7.8 (50)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_density\" (\n \"rank\" text,\n \"state\" text,\n \"population\" real,\n \"area_km\" real,\n \"density\" real\n);\n\nQuestion: What population has an area (km\u00b2) of 62,848 and a density less than 37.7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population\") FROM \"by_density\" WHERE \"area_km\"='62,848' AND \"density\"<37.7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_density\" (\n \"rank\" text,\n \"state\" text,\n \"population\" real,\n \"area_km\" real,\n \"density\" real\n);\n\nQuestion: Which population is the greatest, has a density of 20.3, and an area (km\u00b2) larger than 50,350?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population\") FROM \"by_density\" WHERE \"density\"=20.3 AND \"area_km\">'50,350';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_density\" (\n \"rank\" text,\n \"state\" text,\n \"population\" real,\n \"area_km\" real,\n \"density\" real\n);\n\nQuestion: The state of Aguascalientes has an area (km\u00b2) larger than 151,571 and a density greater than 80.9, what is the rank?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"by_density\" WHERE \"area_km\">'151,571' AND \"density\">80.9 AND \"state\"='aguascalientes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team at the game held at the Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_15\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game held when Fitzroy was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_15\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many people attended the Rams game against the Kansas City Chiefs?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='kansas city chiefs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is China's IATA?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"references\" WHERE \"country\"='china';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Where is the City of Douala?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"references\" WHERE \"city\"='douala';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which airport is in South Africa and has a ICAO fajs?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"references\" WHERE \"country\"='south africa' AND \"icao\"='fajs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is Cuba's ICAO?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"references\" WHERE \"country\"='cuba';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is Angola's airport and ICAO of fnsa?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"references\" WHERE \"country\"='angola' AND \"icao\"='fnsa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team plays at home at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the size of the crowd that saw the Home team score 11.10 (76)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"home_team_score\"='11.10 (76)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Footscray's score as an away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"away_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home teams score agains the team that scored 7.15 (57)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"away_team_score\"='7.15 (57)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is richmond the away side?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_17\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team when hawthorn is the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scratchers\" (\n \"game_name\" text,\n \"price\" text,\n \"top_prize\" text,\n \"launch_date\" text,\n \"odds_of_winning\" text\n);\n\nQuestion: What is the name of the game with odds of winning 1 in 4.23 with a top prize of $15,000?"
},
{
"role": "assistant",
"content": "SELECT \"game_name\" FROM \"scratchers\" WHERE \"odds_of_winning\"='1 in 4.23' AND \"top_prize\"='$15,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scratchers\" (\n \"game_name\" text,\n \"price\" text,\n \"top_prize\" text,\n \"launch_date\" text,\n \"odds_of_winning\" text\n);\n\nQuestion: What is the launch date odds of winning 1 in 4.23 with a top prize of $15,000?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date\" FROM \"scratchers\" WHERE \"odds_of_winning\"='1 in 4.23' AND \"top_prize\"='$15,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scratchers\" (\n \"game_name\" text,\n \"price\" text,\n \"top_prize\" text,\n \"launch_date\" text,\n \"odds_of_winning\" text\n);\n\nQuestion: What is the launch date odds of winning 1 in 4.54?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date\" FROM \"scratchers\" WHERE \"odds_of_winning\"='1 in 4.54';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scratchers\" (\n \"game_name\" text,\n \"price\" text,\n \"top_prize\" text,\n \"launch_date\" text,\n \"odds_of_winning\" text\n);\n\nQuestion: What is the launch date odds of winning 1 in 4.44?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date\" FROM \"scratchers\" WHERE \"odds_of_winning\"='1 in 4.44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scratchers\" (\n \"game_name\" text,\n \"price\" text,\n \"top_prize\" text,\n \"launch_date\" text,\n \"odds_of_winning\" text\n);\n\nQuestion: What is the name of the game with a top prize of $888?"
},
{
"role": "assistant",
"content": "SELECT \"game_name\" FROM \"scratchers\" WHERE \"top_prize\"='$888';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scratchers\" (\n \"game_name\" text,\n \"price\" text,\n \"top_prize\" text,\n \"launch_date\" text,\n \"odds_of_winning\" text\n);\n\nQuestion: What is the top price of $1 with a launch date on February 12, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"top_prize\" FROM \"scratchers\" WHERE \"price\"='$1' AND \"launch_date\"='february 12, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_3_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the highest number of laps when there are less than 5 points for team garry rogers motorsport and the grid number is under 23?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race_3_results\" WHERE \"points\"<5 AND \"team\"='garry rogers motorsport' AND \"grid\"<23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_3_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the name of the driver who went 46 laps had less than 9 points and had a grid number under 12?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"race_3_results\" WHERE \"laps\"=46 AND \"points\"<9 AND \"grid\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_finals\" (\n \"year\" real,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"finals_venue_surface\" text,\n \"city\" text\n);\n\nQuestion: Where was the 1966 final played?"
},
{
"role": "assistant",
"content": "SELECT \"finals_venue_surface\" FROM \"list_of_finals\" WHERE \"year\"=1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer\" text,\n \"best_score\" real,\n \"worst_dancer\" text,\n \"worst_score\" real\n);\n\nQuestion: What is the average Worst score for Mario Lopez as the Best dancer and Tango as the Dance?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"worst_score\") FROM \"highest_and_lowest_scoring_performances\" WHERE \"best_dancer\"='mario lopez' AND \"dance\"='tango';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer\" text,\n \"best_score\" real,\n \"worst_dancer\" text,\n \"worst_score\" real\n);\n\nQuestion: What is the highest Best score for the Dance Mambo?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"best_score\") FROM \"highest_and_lowest_scoring_performances\" WHERE \"dance\"='mambo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_and_lowest_scoring_performances\" (\n \"dance\" text,\n \"best_dancer\" text,\n \"best_score\" real,\n \"worst_dancer\" text,\n \"worst_score\" real\n);\n\nQuestion: Who is the Best dancer with the Worst dancer of Jerry Springer, a Best score of 29, and the Dance was the Quickstep?"
},
{
"role": "assistant",
"content": "SELECT \"best_dancer\" FROM \"highest_and_lowest_scoring_performances\" WHERE \"worst_dancer\"='jerry springer' AND \"best_score\"=29 AND \"dance\"='quickstep';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"averages\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: How many dances placed below 1 with a point total of 40?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_dances\" FROM \"averages\" WHERE \"place\">1 AND \"total_points\"=40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"averages\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest number of dances with a rank larger than 4 and a place of 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number_of_dances\") FROM \"averages\" WHERE \"rank_by_average\">4 AND \"place\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"averages\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest number of dances with a less than 2 place and an average smaller than 27.5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number_of_dances\") FROM \"averages\" WHERE \"place\"<2 AND \"average\"<27.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"europe_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the total difference for teams that played less than 6 games?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"diff\") FROM \"europe_pool_a\" WHERE \"played\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"europe_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the highest number of games played for teams that lost over 5 games and had an against total of 228?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"played\") FROM \"europe_pool_a\" WHERE \"lost\">5 AND \"against\"=228;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"europe_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: How many games lost for team(s) with less than 4 paints and against total of over 340?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"europe_pool_a\" WHERE \"points\"<4 AND \"against\">340;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What week was the game that had an attendance of 24,242?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"game_by_game_results\" WHERE \"attendance\"='24,242';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance of the game that had a score of l 35\u201314?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_by_game_results\" WHERE \"result\"='l 35\u201314';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: When was the pre-Week 10 game that had an attendance of over 38,865?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_by_game_results\" WHERE \"week\"<10 AND \"attendance\"='38,865';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_in_sports\" (\n \"date\" text,\n \"event\" text,\n \"alternate_name_s\" text,\n \"location\" text,\n \"attendance\" text,\n \"ppv_buyrate\" text\n);\n\nQuestion: Which Location has a PPV Buyrate of 775,000?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"2006_in_sports\" WHERE \"ppv_buyrate\"='775,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did Geelong play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team's score against Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_5\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the largest crowd when the home team scored 14.7 (91)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_5\" WHERE \"home_team_score\"='14.7 (91)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What as the home team that scored 18.15 (123)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"home_team_score\"='18.15 (123)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team that scored 6.13 (49)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"away_team_score\"='6.13 (49)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When Fitzroy was the home team, what was the away team's score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the home team score 5.8 (38)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_12\" WHERE \"home_team_score\"='5.8 (38)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the largest crowd recorded at the Arden Street Oval venue?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_12\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the crowd at the match where the away team had a score of 10.14 (74)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_12\" WHERE \"away_team_score\"='10.14 (74)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size at all matches where the home team scored 6.12 (48)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_12\" WHERE \"home_team_score\"='6.12 (48)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At what venue did the match where the home team scored 8.6 (54) take place?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"home_team_score\"='8.6 (54)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the smallest attendance in week 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"exhibition_schedule\" WHERE \"week\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the larges week for the date august 9, 1968 and less than 64,020 in attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"exhibition_schedule\" WHERE \"date\"='august 9, 1968' AND \"attendance\"<'64,020';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the smallest attendance number for august 9, 1968?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"exhibition_schedule\" WHERE \"date\"='august 9, 1968';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result of the game on august 30, 1968?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"exhibition_schedule\" WHERE \"date\"='august 30, 1968';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wbfj_fm\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the class of the w267an call sign?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"broadcast_translators_of_wbfj_fm\" WHERE \"call_sign\"='w267an';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wbfj_fm\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the lowest ERP W of the 67829 Facility ID?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"erp_w\") FROM \"broadcast_translators_of_wbfj_fm\" WHERE \"facility_id\"=67829;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wbfj_fm\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_w\" real,\n \"height_m_ft\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the FCC info for the call sign with a frequency MHz of 101.3, a ERP W over 10, and a Facility ID smaller than 87027?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"broadcast_translators_of_wbfj_fm\" WHERE \"frequency_m_hz\"=101.3 AND \"erp_w\">10 AND \"facility_id\"<87027;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"rank\" real,\n \"score\" real,\n \"date\" text,\n \"player\" text,\n \"opponent\" text,\n \"minutes\" real,\n \"fgm_fga\" text,\n \"3_pm_3_pa\" text,\n \"ftm_fta\" text,\n \"off_reb\" real,\n \"def_reb\" real,\n \"assists\" real,\n \"steals\" real,\n \"blocks\" real,\n \"turnovers\" real,\n \"fouls\" real,\n \"points\" real\n);\n\nQuestion: What was the average of the Off Reb with steals less than 8 and FTM-FTA of 16-17?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"off_reb\") FROM \"external_links\" WHERE \"ftm_fta\"='16-17' AND \"steals\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"song\" text,\n \"release_date\" text,\n \"release_info\" text,\n \"formats\" text,\n \"album\" text\n);\n\nQuestion: Which song released on heavenly (hvn152)?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"singles\" WHERE \"release_info\"='heavenly (hvn152)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"song\" text,\n \"release_date\" text,\n \"release_info\" text,\n \"formats\" text,\n \"album\" text\n);\n\nQuestion: Which album had a release of heavenly (hvn95)?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"singles\" WHERE \"release_info\"='heavenly (hvn95)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of all the rounds when a Florida State player was drafted?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"1997_new_england_patriots_draft_selectio\" WHERE \"college\"='florida state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average round in which a Safety with an overall rank higher than 89 was drafted?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"1997_new_england_patriots_draft_selectio\" WHERE \"position\"='safety' AND \"overall\">89;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"venue\" text\n);\n\nQuestion: Where was 2010 tournament where the United States received the silver?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"silver\"='united states' AND \"year\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"venue\" text\n);\n\nQuestion: Where was the tournament where Finland received the bronze and the United States received the silver?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"bronze\"='finland' AND \"silver\"='united states';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"venue\" text\n);\n\nQuestion: Who received the gold at the tournament at bratislava where the Czech Republic received the silver?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"results\" WHERE \"silver\"='czech republic' AND \"venue\"='bratislava';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"venue\" text\n);\n\nQuestion: Where was the post 1991 tournament where the Czech Republic received the bronze and Russia received the silver?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"year\">1991 AND \"bronze\"='czech republic' AND \"silver\"='russia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when the home team scored 10.12 (72)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"home_team_score\"='10.12 (72)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at the game at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"venue\"='kardinia park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the smallest crowd for a Melbourne away game?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_2\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team that scored 10.12 (72)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"home_team_score\"='10.12 (72)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What day did the team play on week 8?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season_schedule\" WHERE \"week\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the average size of the crowd for matches held at Corio Oval?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_12\" WHERE \"venue\"='corio oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: For the match with an away team score of 16.21 (117), what was the home team score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"away_team_score\"='16.21 (117)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: For the match with a home team score of 11.14 (80), what was the venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"home_team_score\"='11.14 (80)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What home team played against St Kilda?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At what venue was South Melbourne the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_14\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Hawthorn's score when they were the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At which venue did the away team score 7.7 (49)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_14\" WHERE \"away_team_score\"='7.7 (49)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team's score when they played at Lake Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"venue\"='lake oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indicators\" (\n \"country\" text,\n \"area_km_2010\" text,\n \"population_2011\" text,\n \"gdp_ppp_intl_2011\" text,\n \"gdp_ppp_per_capita_intl_2011\" text,\n \"income_inequality_1994_2011_latest_available\" text,\n \"hdi_2011\" text,\n \"fsi_2012\" text,\n \"cpi_2011\" text,\n \"ief_2011\" text,\n \"gpi_2012\" text,\n \"wpfi_2011_2012\" text,\n \"di_2011\" text\n);\n\nQuestion: What is the latest available income inequality for the country with a population of 21,315,135?"
},
{
"role": "assistant",
"content": "SELECT \"income_inequality_1994_2011_latest_available\" FROM \"indicators\" WHERE \"population_2011\"='21,315,135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indicators\" (\n \"country\" text,\n \"area_km_2010\" text,\n \"population_2011\" text,\n \"gdp_ppp_intl_2011\" text,\n \"gdp_ppp_per_capita_intl_2011\" text,\n \"income_inequality_1994_2011_latest_available\" text,\n \"hdi_2011\" text,\n \"fsi_2012\" text,\n \"cpi_2011\" text,\n \"ief_2011\" text,\n \"gpi_2012\" text,\n \"wpfi_2011_2012\" text,\n \"di_2011\" text\n);\n\nQuestion: What is the IEF 2011 of the country with an FSI 2012 of 99.2?"
},
{
"role": "assistant",
"content": "SELECT \"ief_2011\" FROM \"indicators\" WHERE \"fsi_2012\"='99.2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indicators\" (\n \"country\" text,\n \"area_km_2010\" text,\n \"population_2011\" text,\n \"gdp_ppp_intl_2011\" text,\n \"gdp_ppp_per_capita_intl_2011\" text,\n \"income_inequality_1994_2011_latest_available\" text,\n \"hdi_2011\" text,\n \"fsi_2012\" text,\n \"cpi_2011\" text,\n \"ief_2011\" text,\n \"gpi_2012\" text,\n \"wpfi_2011_2012\" text,\n \"di_2011\" text\n);\n\nQuestion: What is the current income inequality for the country of Seychelles?"
},
{
"role": "assistant",
"content": "SELECT \"income_inequality_1994_2011_latest_available\" FROM \"indicators\" WHERE \"country\"='seychelles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indicators\" (\n \"country\" text,\n \"area_km_2010\" text,\n \"population_2011\" text,\n \"gdp_ppp_intl_2011\" text,\n \"gdp_ppp_per_capita_intl_2011\" text,\n \"income_inequality_1994_2011_latest_available\" text,\n \"hdi_2011\" text,\n \"fsi_2012\" text,\n \"cpi_2011\" text,\n \"ief_2011\" text,\n \"gpi_2012\" text,\n \"wpfi_2011_2012\" text,\n \"di_2011\" text\n);\n\nQuestion: What is the HDI 2011 of the country with a DI 2011 of 7.63?"
},
{
"role": "assistant",
"content": "SELECT \"hdi_2011\" FROM \"indicators\" WHERE \"di_2011\"='7.63';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indicators\" (\n \"country\" text,\n \"area_km_2010\" text,\n \"population_2011\" text,\n \"gdp_ppp_intl_2011\" text,\n \"gdp_ppp_per_capita_intl_2011\" text,\n \"income_inequality_1994_2011_latest_available\" text,\n \"hdi_2011\" text,\n \"fsi_2012\" text,\n \"cpi_2011\" text,\n \"ief_2011\" text,\n \"gpi_2012\" text,\n \"wpfi_2011_2012\" text,\n \"di_2011\" text\n);\n\nQuestion: What country has an IEF 2011 of 45.3?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"indicators\" WHERE \"ief_2011\"='45.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date did South Melbourne play as the Away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_18\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did Essendon play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: What is the school or country for the guard from 2000?"
},
{
"role": "assistant",
"content": "SELECT \"school_country\" FROM \"p\" WHERE \"position\"='guard' AND \"from\"='2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: What is the player from the year 2000?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"p\" WHERE \"from\"='2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: What position does the player from 2002 play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"p\" WHERE \"from\"='2002';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.