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 \"round_16\" (\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 of the Home team of Collingwood?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_16\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What away team had a score of 7.9 (51)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"away_team_score\"='7.9 (51)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the home team score when the away team scored 6.13 (49)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" 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_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What date was the home team score 5.9 (39)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" WHERE \"home_team_score\"='5.9 (39)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the away team when the home team was south melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" 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_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the away team when the home team score was 5.9 (39)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"home_team_score\"='5.9 (39)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the home team score when the away team score was 6.13 (49)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" 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_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who was recruited from Calgary?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"college\"='calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What number of wins was ranked higher than 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"rank\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What rank is Miller Barber with more than 11 wins?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"leaders\" WHERE \"wins\">11 AND \"player\"='miller barber';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 venue when the away team scored 11.11 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team_score\"='11.11 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 venue when Collingwood was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 venue when the away team scored 11.11 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team_score\"='11.11 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 many people were in the crowd when the away team scored 17.17 (119)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_16\" WHERE \"away_team_score\"='17.17 (119)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 at vfl park?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_16\" WHERE \"venue\"='vfl park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\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 many people were at the game where the home team was South Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_3\" 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_3\" (\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 score when the away team was Footscray?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_3\" 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_3\" (\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 score when the away team was Collingwood?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_3\" 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_3\" (\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 that played at Corio Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_3\" 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 \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: How many goals were scored on November 22, 1994?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goal\") FROM \"international_goals\" WHERE \"date\"='november 22, 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the game with 9 goals?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" real,\n \"against_prohibition\" real,\n \"percent_against\" real\n);\n\nQuestion: What is the highest number supporting prohibition in British Columbia when the percent opposing is more than 10.8, the percent supporting is less than 72.2, number against is less than 4,756?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"for_prohibition\") FROM \"results_of_the_national_referendum_on_pr\" WHERE \"percent_against\">10.8 AND \"percent_for\"<72.2 AND \"jurisdiction\"='british columbia' AND \"against_prohibition\"<'4,756';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" real,\n \"against_prohibition\" real,\n \"percent_against\" real\n);\n\nQuestion: What is the lowest percentage opposing prohibition when the number opposing is 9,575 and the percent supporting is less than 72.2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"percent_against\") FROM \"results_of_the_national_referendum_on_pr\" WHERE \"against_prohibition\"='9,575' AND \"percent_for\"<72.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_referendum_on_pr\" (\n \"jurisdiction\" text,\n \"for_prohibition\" real,\n \"percent_for\" real,\n \"against_prohibition\" real,\n \"percent_against\" real\n);\n\nQuestion: What is the highest percent supporting prohibition when the number opposing is less than 2,978 and the percent opposing is less than 31.2 while the number supporting is less than 9,461?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"percent_for\") FROM \"results_of_the_national_referendum_on_pr\" WHERE \"against_prohibition\"<'2,978' AND \"percent_against\"<31.2 AND \"for_prohibition\"<'9,461';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7701_7800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: what is the apparent magnitude of the constellation sculptor"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"apparent_magnitude\") FROM \"7701_7800\" WHERE \"constellation\"='sculptor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7701_7800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What is the Right ascension of the Object type spiral galaxy that has an Apparent magnitude larger that 12.2"
},
{
"role": "assistant",
"content": "SELECT \"right_ascension_j2000\" FROM \"7701_7800\" WHERE \"object_type\"='spiral galaxy' AND \"apparent_magnitude\">12.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7701_7800\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which Constellation has an Apparent magnitude larger that 7.7, and an NGC number of 7777"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"7701_7800\" WHERE \"apparent_magnitude\">7.7 AND \"ngc_number\"=7777;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the name of the Chassis of Diver Maria Teresa de Filippis in round 1?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"rounds\"='1' AND \"driver\"='maria teresa de filippis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many yards have a Player of james macpherson, and a Long smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"yards\") FROM \"running_backs\" WHERE \"player\"='james macpherson' AND \"long\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many averages have a TD's of 6, and more than 25 yards?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"avg\") FROM \"running_backs\" WHERE \"td_s\"=6 AND \"yards\">25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What is the lowest car with more than 122 yards?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"car\") FROM \"running_backs\" WHERE \"yards\">122;"
}
] |
[
{
"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 away team has a home team score of 10.13 (73)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_9\" WHERE \"home_team_score\"='10.13 (73)';"
}
] |
[
{
"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: Which home team has home team score of 12.12 (84)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"home_team_score\"='12.12 (84)';"
}
] |
[
{
"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 \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What round was Ryan Thang drafted in?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"player\"='ryan thang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: How many laps did Jeff Burton have when he drove car with a # over 9 and more than 118 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race_results\" WHERE \"car_num\">9 AND \"driver\"='jeff burton' AND \"points\">118;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: What was Scott Riggs points when he had more than 400 laps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"race_results\" WHERE \"driver\"='scott riggs' AND \"laps\">400;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" real,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: Who drove the dodge with a car # less than 5?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race_results\" WHERE \"car_num\"<5 AND \"make\"='dodge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What team had a high rebound of perkins (9) and a game smaller than 78?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"<78 AND \"high_rebounds\"='perkins (9)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What date were the high assists rondo (5) and the high rebounds rondo (10)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"high_assists\"='rondo (5)' AND \"high_rebounds\"='rondo (10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: On the date April 11, what were the high points?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='april 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: On the date April 11, what is the total game number?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"date\"='april 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_supporting_actress\" (\n \"year\" text,\n \"name\" text,\n \"film\" text,\n \"role\" text,\n \"status\" text\n);\n\nQuestion: What actor made a film in 1957?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"best_supporting_actress\" WHERE \"year\"='1957';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_supporting_actress\" (\n \"year\" text,\n \"name\" text,\n \"film\" text,\n \"role\" text,\n \"status\" text\n);\n\nQuestion: What year did Miyoshi Umeki make a film?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"best_supporting_actress\" WHERE \"name\"='miyoshi umeki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_supporting_actress\" (\n \"year\" text,\n \"name\" text,\n \"film\" text,\n \"role\" text,\n \"status\" text\n);\n\nQuestion: What status has a role?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"best_supporting_actress\" WHERE \"role\"='role';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_by_round\" (\n \"round\" real,\n \"nominees\" text,\n \"team\" text,\n \"match\" text,\n \"ground\" text\n);\n\nQuestion: what is the earliest round for nominee david mundy?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"winners_by_round\" WHERE \"nominees\"='david mundy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_by_round\" (\n \"round\" real,\n \"nominees\" text,\n \"team\" text,\n \"match\" text,\n \"ground\" text\n);\n\nQuestion: what round saw the ground of telstra dome and shaun burgoyne as nominees?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"winners_by_round\" WHERE \"ground\"='telstra dome' AND \"nominees\"='shaun burgoyne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_by_country\" (\n \"country\" text,\n \"total\" real,\n \"marathon_men_s\" real,\n \"marathon_women_s\" real,\n \"half_marathon_men_s\" real,\n \"half_marathon_women_s\" real\n);\n\nQuestion: When the total winners was smaller than 2 and 2 woman won, what's the average of the men's half marathon winners?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"half_marathon_men_s\") FROM \"winners_by_country\" WHERE \"marathon_women_s\"=2 AND \"total\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What has the lowest number of wins with GA smaller than 39, more than 2 losses, and ties greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"final_standing\" WHERE \"goals_against\"<39 AND \"losses\">2 AND \"ties\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: Which team has the most ties with fewer than 4 losses and GA smaller than 20?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ties\") FROM \"final_standing\" WHERE \"losses\"<4 AND \"goals_against\"<20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many games did the team lose that played 7 games and has a GA of less than 27?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"final_standing\" WHERE \"games_played\"=7 AND \"goals_against\"<27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1930s_bears_12_11_1\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"attendance\" real,\n \"location\" text\n);\n\nQuestion: what date saw the chicago bears lose in green bay earlier than 1931?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1930s_bears_12_11_1\" WHERE \"loser\"='chicago bears' AND \"location\"='green bay' AND \"year\"<1931;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\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 Away team score for Away team Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_19\" 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_19\" (\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: Which Home team with the Hawthorn Away team has a Crowd larger than 21,876?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_19\" WHERE \"crowd\">'21,876' AND \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"displacement\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: what is the years for the displacement 4.0l (242cid)?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"engines\" WHERE \"displacement\"='4.0l (242cid)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"years\" text,\n \"displacement\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: Which engine has a torgue of lb\u00b7ft (n\u00b7m)?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engines\" WHERE \"torque\"='lb\u00b7ft (n\u00b7m)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"mountain_west\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: How many years for the team with under 31 ties and a percentage of 0.5451?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"tied\"<31 AND \"pct\"=0.5451;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"mountain_west\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: How many games tied for the air force with over 57 years participating?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tied\") FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"mountain_west\"='air force' AND \"years\">57;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"coaches\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What is the description where the date is 1911?"
},
{
"role": "assistant",
"content": "SELECT \"description\" FROM \"coaches\" WHERE \"date\"=1911;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"coaches\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What is the number and name where the date is earlier than 1905?"
},
{
"role": "assistant",
"content": "SELECT \"number_name\" FROM \"coaches\" WHERE \"date\"<1905;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"secondary_schools\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"local_board\" text,\n \"suburb\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: What year was the name mount roskill grammar school?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"secondary_schools\" WHERE \"name\"='mount roskill grammar school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\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 melbourne played as the home team, who did they play?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\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 the home team was geelong, who played as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_7\" 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_7\" (\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: If north melbourne played as the home team, who was the away team they played?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\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.5 (65)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"home_team_score\"='10.5 (65)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\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 st kilda was playing at home what was the away teams score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_1995_1996\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the production code of the episode before season 8, with a series number less than 31, and aired on September 21, 1995?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"season_2_1995_1996\" WHERE \"season_num\"<8 AND \"series_num\"<31 AND \"original_air_date\"='september 21, 1995';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 played where the home team scored 14.12 (96)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_1\" WHERE \"home_team_score\"='14.12 (96)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 18.9 (117)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"home_team_score\"='18.9 (117)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\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: Which home team scored 18.9 (117)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"home_team_score\"='18.9 (117)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 smallest amount of spectators when the away team was Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_1\" 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_1\" (\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 many people attended when the away team was Richmond?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_1\" 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 \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when the record was 18\u201314\u20134 with a toivonen decision?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"december\" WHERE \"decision\"='toivonen' AND \"record\"='18\u201314\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What's the sum of the attendance for the calgary home team?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"december\" WHERE \"home\"='calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record when chicago was the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"december\" WHERE \"visitor\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"postseason\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"series\" text,\n \"arena\" text\n);\n\nQuestion: What was the record of the series at the game attended by 17,181 and a loss of Giguere (0\u20131)?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"postseason\" WHERE \"attendance\">'17,181' AND \"loss\"='giguere (0\u20131)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"postseason\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"series\" text,\n \"arena\" text\n);\n\nQuestion: What was the date of the game when the record of the series was 0\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"postseason\" WHERE \"series\"='0\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 was the away team when the home team scored 10.16 (76)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_10\" WHERE \"home_team_score\"='10.16 (76)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 sum of Crowd when the away team scored 8.12 (60)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_10\" WHERE \"away_team_score\"='8.12 (60)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 number of people in the crowd when the home team scored 15.20 (110)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_10\" WHERE \"home_team_score\"='15.20 (110)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 score for the away team when South Melbourne was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_10\" 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 \"2000s_chiefs_12_8\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What was the score of the 2001 game held at Network Associates Coliseum?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2000s_chiefs_12_8\" WHERE \"year\"=2001 AND \"location\"='network associates coliseum';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serie_d\" (\n \"name\" text,\n \"short_name\" text,\n \"city\" text,\n \"region\" text,\n \"girone\" text,\n \"home_venue\" text\n);\n\nQuestion: What region has giuseppe sivori as a home venue?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"serie_d\" WHERE \"home_venue\"='giuseppe sivori';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serie_d\" (\n \"name\" text,\n \"short_name\" text,\n \"city\" text,\n \"region\" text,\n \"girone\" text,\n \"home_venue\" text\n);\n\nQuestion: What city has the nickname of pontisola?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"serie_d\" WHERE \"short_name\"='pontisola';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serie_d\" (\n \"name\" text,\n \"short_name\" text,\n \"city\" text,\n \"region\" text,\n \"girone\" text,\n \"home_venue\" text\n);\n\nQuestion: What squad plays at comunale in darfo boario terme?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"serie_d\" WHERE \"home_venue\"='comunale' AND \"city\"='darfo boario terme';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"league_from\" text\n);\n\nQuestion: What pick was Scott Glennie from the Western hockey league"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_one\" WHERE \"league_from\"='western hockey league' AND \"player\"='scott glennie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"league_from\" text\n);\n\nQuestion: What player from the United States played in the western collegiate hockey association?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"nationality\"='united states' AND \"league_from\"='western collegiate hockey association';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Where the time/retired is +1 lap, the constructor is BRM, and the grid is above 1, what's the highest laps recorded?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"time_retired\"='+1 lap' AND \"constructor\"='brm' AND \"grid\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the laps driven were under 9 and the time/retired recorded was engine, what's the total number of grid values?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"laps\"<9 AND \"time_retired\"='engine';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver has a grid of 3?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the laps are 31 and the constructor was honda, what's the sum of all grid values?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"constructor\"='honda' AND \"laps\"=31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the chassis for all rounds on the entrant Benson and Hedges Jordan driven by Damon Hill?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"drivers_and_constructors\" WHERE \"rounds\"='all' AND \"entrant\"='benson and hedges jordan' AND \"driver\"='damon hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the constructor of driver Alexander Wurz?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"driver\"='alexander wurz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who was the driver that had all rounds and a f399 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"drivers_and_constructors\" WHERE \"rounds\"='all' AND \"chassis\"='f399';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What were the rounds on the Engine \u2020 of the Ferrari 048?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"drivers_and_constructors\" WHERE \"engine\"='ferrari 048';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"badminton\" (\n \"event\" text,\n \"2nd_round\" text,\n \"quarterfinal\" text,\n \"semifinal\" text,\n \"final\" text,\n \"rank\" real\n);\n\nQuestion: Which Semifinal has an Event of team?"
},
{
"role": "assistant",
"content": "SELECT \"semifinal\" FROM \"badminton\" WHERE \"event\"='team';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"badminton\" (\n \"event\" text,\n \"2nd_round\" text,\n \"quarterfinal\" text,\n \"semifinal\" text,\n \"final\" text,\n \"rank\" real\n);\n\nQuestion: Which Quarterfinal has a Rank larger than 9?"
},
{
"role": "assistant",
"content": "SELECT \"quarterfinal\" FROM \"badminton\" WHERE \"rank\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick number of the DB?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"round_two\" WHERE \"position\"='db';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did the T who was pick after 13 go to?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_two\" WHERE \"pick_num\">13 AND \"position\"='t';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which CFL team drafted a pick from Boston College?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_two\" WHERE \"college\"='boston college';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position did the Saskatchewan player get drafted as?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_two\" WHERE \"college\"='saskatchewan';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.