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 \"singles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the score for when the opponent in the final is shiho hisamatsu"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_titles_5\" WHERE \"opponent_in_the_final\"='shiho hisamatsu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the tournament for april 3, 2005"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_titles_5\" WHERE \"date\"='april 3, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name th score for may 11, 2003"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_titles_5\" WHERE \"date\"='may 11, 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed pedro diniz's car?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='pedro diniz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid total for david coulthard with over 45 laps?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='david coulthard' AND \"laps\">45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"gymnast\" text,\n \"start_value\" real,\n \"penalty\" text,\n \"average\" real,\n \"total\" real\n);\n\nQuestion: What is the average for the gymnast with a 9.9 start value and a total of 9.612?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"average\") FROM \"final\" WHERE \"start_value\"=9.9 AND \"total\"=9.612;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"gymnast\" text,\n \"start_value\" real,\n \"penalty\" text,\n \"average\" real,\n \"total\" real\n);\n\nQuestion: What was the penalty for the gymnast with average above 9.662 and total is more than 9.706?"
},
{
"role": "assistant",
"content": "SELECT \"penalty\" FROM \"final\" WHERE \"average\">9.662 AND \"total\">9.706;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_telly_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: What category was Kasautii Zindagii Kay nominated for after 2005?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"indian_telly_awards\" WHERE \"year\">2005 AND \"for_the_show\"='kasautii zindagii kay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_telly_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: What show had a nomination for best actor in a lead role \u2013 female (popular) in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"for_the_show\" FROM \"indian_telly_awards\" WHERE \"category\"='best actor in a lead role \u2013 female (popular)' AND \"year\"=2006;"
}
] |
[
{
"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\" real\n);\n\nQuestion: In what week was the Result L 15-13?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 15-13';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is the Attendance with Opponent Dallas Cowboys in a Week greater than 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='dallas cowboys' AND \"week\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points for maserati v12 engines in 1968?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"complete_world_championship_results\" WHERE \"engine\"='maserati v12' AND \"year\"=1968;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What entrant had less than 3 points before 1963?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_world_championship_results\" WHERE \"year\"<1963 AND \"points\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who had the pole at the French Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"grands_prix\" WHERE \"grand_prix\"='french grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who constructed the car that won the Canadian Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"grands_prix\" WHERE \"grand_prix\"='canadian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: When Michael Schumacher won the race, who had the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"grands_prix\" WHERE \"winning_driver\"='michael schumacher';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: For the Player playing for the College of Kentucky and a Height of 6-7 what was their corresponding School?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2010_boys_team\" WHERE \"college\"='kentucky' AND \"height\"='6-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What School did Terrence Jones play for?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2010_boys_team\" WHERE \"player\"='terrence jones';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What Player(s) have a Height of 6-3?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2010_boys_team\" WHERE \"height\"='6-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: For the player with a Height of 6-9 and College of Kentucky what was their NBA Draft?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"2010_boys_team\" WHERE \"height\"='6-9' AND \"college\"='kentucky';"
}
] |
[
{
"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 was the score on February 9?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='february 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average point total for arrows racing team before 1983?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"complete_formula_one_results\" WHERE \"team\"='arrows racing team' AND \"year\"<1983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What team has jordan 193 chassis after 1990?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"complete_formula_one_results\" WHERE \"year\">1990 AND \"chassis\"='jordan 193';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points for the cosworth v8 engine after 1985?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"complete_formula_one_results\" WHERE \"year\">1985 AND \"engine\"='cosworth v8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the constructor for the driver with grid less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What Position did Aaron Williams play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"w\" WHERE \"player\"='aaron williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: At Position of guard, from the School/Club Team Notre Dame, how many Years for Jazz did that person play?"
},
{
"role": "assistant",
"content": "SELECT \"years_for_jazz\" FROM \"w\" WHERE \"position\"='guard' AND \"school_club_team\"='notre dame';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which School/Club Team did Andre Wakefield play for?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"w\" WHERE \"player\"='andre wakefield';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Nationality of the player who had Position of guard from School/Club Team Notre Dame?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"w\" WHERE \"position\"='guard' AND \"school_club_team\"='notre dame';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What School/Club Team is Player Howard Wood from?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"w\" WHERE \"player\"='howard wood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What School/Club Team is Player Aaron Williams from?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"w\" WHERE \"player\"='aaron williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" text\n);\n\nQuestion: What is the street address of the building with 5 floors?"
},
{
"role": "assistant",
"content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" text\n);\n\nQuestion: What is the street address of the building with 40 floors?"
},
{
"role": "assistant",
"content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"='40';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" text\n);\n\nQuestion: What were the years the building with 44 floors was tallest?"
},
{
"role": "assistant",
"content": "SELECT \"years_as_tallest\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"='44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" text\n);\n\nQuestion: What is the street address of Oliver Building?"
},
{
"role": "assistant",
"content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='oliver building';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"labour_targets\" (\n \"rank\" real,\n \"constituency\" text,\n \"winning_party_2003\" text,\n \"swing_to_gain\" real,\n \"labour_s_place_2003\" text,\n \"result\" text\n);\n\nQuestion: Can you tell me the Winning party of 2003 that has the Constituency of aberdeen north?"
},
{
"role": "assistant",
"content": "SELECT \"winning_party_2003\" FROM \"labour_targets\" WHERE \"constituency\"='aberdeen north';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"labour_targets\" (\n \"rank\" real,\n \"constituency\" text,\n \"winning_party_2003\" text,\n \"swing_to_gain\" real,\n \"labour_s_place_2003\" text,\n \"result\" text\n);\n\nQuestion: Can you tell me the lowest Rank that has the Constituency of strathkelvin and bearsden?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"labour_targets\" WHERE \"constituency\"='strathkelvin and bearsden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"labour_targets\" (\n \"rank\" real,\n \"constituency\" text,\n \"winning_party_2003\" text,\n \"swing_to_gain\" real,\n \"labour_s_place_2003\" text,\n \"result\" text\n);\n\nQuestion: Can you tell me the sum of Swing to gain that has Constituency of caithness, sutherland and easter ross?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"swing_to_gain\") FROM \"labour_targets\" WHERE \"constituency\"='caithness, sutherland and easter ross';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"labour_targets\" (\n \"rank\" real,\n \"constituency\" text,\n \"winning_party_2003\" text,\n \"swing_to_gain\" real,\n \"labour_s_place_2003\" text,\n \"result\" text\n);\n\nQuestion: Can you tell me Labour's place 2003 that has the Result of con hold, and the Constituency of ayr?"
},
{
"role": "assistant",
"content": "SELECT \"labour_s_place_2003\" FROM \"labour_targets\" WHERE \"result\"='con hold' AND \"constituency\"='ayr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the Time/Retired of Laps of 75?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"=75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Driver has Laps larger than 78, and a Time/Retired of + 1:09.4?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\">78 AND \"time_retired\"='+ 1:09.4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Hows many Laps are in a Grid of 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"grid\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 away team score 13.13 (91) in front of a crowd larger than 15,601?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_20\" WHERE \"crowd\">'15,601' AND \"away_team_score\"='13.13 (91)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 of the away team where the home team scored 13.20 (98)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_20\" WHERE \"home_team_score\"='13.20 (98)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 much did the away team score that played St Kilda?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_20\" 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 \"round_20\" (\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 venue did the away team Collingwood play at?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_20\" 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_20\" (\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 of the away team that played at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_20\" 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_20\" (\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 name of the away team that played at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_20\" 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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance in the bye week after week 5?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\">5 AND \"opponent\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_winners\" (\n \"year\" real,\n \"athlete\" text,\n \"nation\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What location had 1:59:12 in time?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"women_s_winners\" WHERE \"time\"='1:59:12';"
}
] |
[
{
"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 is the score for the away team of north melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_14\" WHERE \"away_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_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: If the away team scored 8.7 (55), what venue did the play at?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_19\" WHERE \"away_team_score\"='8.7 (55)';"
}
] |
[
{
"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: When the home team scored 25.23 (173), what date did they play/"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_19\" WHERE \"home_team_score\"='25.23 (173)';"
}
] |
[
{
"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 scored 25.23 (173)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_19\" WHERE \"home_team_score\"='25.23 (173)';"
}
] |
[
{
"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: When the away team scored 7.9 (51), what was the smallest crowd that turned out?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_19\" 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_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 plays at victoria park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_19\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: what is the competition for the event team all-round in the year before 1913?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"event\"='team all-round' AND \"year\"<1913;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: what is the event for the year less than 1913 with the position of 2nd?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"achievements\" WHERE \"year\"<1913 AND \"position\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: what is the competition in paris for the parallel bars with a position of 1st?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"venue\"='paris' AND \"position\"='1st' AND \"event\"='parallel bars';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: what is the competition in a year after 1911 with the position of 1st for the rings?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\">1911 AND \"position\"='1st' AND \"event\"='rings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: what is the year that the position was 1st in paris?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"position\"='1st' AND \"venue\"='paris';"
}
] |
[
{
"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 team plays their home matches at the mcg Venue?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_19\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"production_no\" text,\n \"episode_no\" real,\n \"original_airdate\" text,\n \"episode_title\" text,\n \"host\" text\n);\n\nQuestion: What host has an original air date of june 11, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"host\" FROM \"season_1\" WHERE \"original_airdate\"='june 11, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Where is the location of a team with a 3-2 record?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='3-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the result of the team with the 4-2 record?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-2';"
}
] |
[
{
"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 day was played in SCG with the attendance more than 24,824?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"crowd\">'24,824' AND \"venue\"='scg';"
}
] |
[
{
"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 was St Kilda's away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_10\" 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 \"round_4\" (\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 attendance at Moorabbin Oval?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_4\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\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 Melbourne's away team opponent?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" 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_4\" (\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 attendance at the Footscray away game?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_4\" 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 \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the competition that happened on 14 june 2008"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='14 june 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the score for Venue of tanteen recreation ground, st. george's"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='tanteen recreation ground, st. george''s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"num_of_stars\" real,\n \"num_of_weeks\" real,\n \"season_premiere_date\" text,\n \"season_finale_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text\n);\n\nQuestion: How many weeks are associated with Season 3 \u2013 spring 2008?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"num_of_weeks\") FROM \"seasons\" WHERE \"season\"='3 \u2013 spring 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"num_of_stars\" real,\n \"num_of_weeks\" real,\n \"season_premiere_date\" text,\n \"season_finale_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text\n);\n\nQuestion: Who won when robert kudelski finished with under 13 weeks?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"seasons\" WHERE \"num_of_weeks\"<13 AND \"third_place\"='robert kudelski';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the average attendance when Brewers are the opponent with a score of 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='brewers' AND \"score\"='6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What loss occurred on June 10?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='june 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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who is the opponent with a score of 5\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"score\"='5\u20134';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is the week for Result of w 28-17?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"result\"='w 28-17';"
}
] |
[
{
"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\" real\n);\n\nQuestion: What is the avarage Attendance for the Date of october 26, 1947?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 26, 1947';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kaipara\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Can you tell me the Years that has the Name of arapohue school?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"kaipara\" WHERE \"name\"='arapohue school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kaipara\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Can you tell me the lowest Decile that has the Area of matakohe, and the Roll larger than 86?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"decile\") FROM \"kaipara\" WHERE \"area\"='matakohe' AND \"roll\">86;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kaipara\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Can you tell me the total number of Roll that has the Area of aranga?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"roll\") FROM \"kaipara\" WHERE \"area\"='aranga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kaipara\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Can you tell me the Name that has the Roll larger than 419?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"kaipara\" WHERE \"roll\">419;"
}
] |
[
{
"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\" real\n);\n\nQuestion: Which total number of Week has an Opponent of at new orleans saints, and an Attendance larger than 53,448?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='at new orleans saints' AND \"attendance\">'53,448';"
}
] |
[
{
"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\" real\n);\n\nQuestion: Which Attendance has a Result of w 51-21?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='w 51-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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 Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_8\" 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_8\" (\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 crowd size for a game when the away team scored 17.16 (118)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_8\" WHERE \"away_team_score\"='17.16 (118)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average top-25 value for majors that have more than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the most number of cuts made that had more than 7 events played and more than 2 top-25s?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"cuts_made\") FROM \"summary\" WHERE \"events\"=7 AND \"top_25\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: For top-25 values under 2, what is the average number of cuts made?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"cuts_made\") FROM \"summary\" WHERE \"top_25\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"total_seats\" real\n);\n\nQuestion: With a dail of 24th and more than 57 seats, what is the election?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"general_election_results\" WHERE \"seats\">57 AND \"d_il\"='24th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"total_seats\" real\n);\n\nQuestion: with shares of 45.3% and total seats less than 166. what is the greatest number of seat?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"seats\") FROM \"general_election_results\" WHERE \"share_of_votes\"='45.3%' AND \"total_seats\"<166;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"total_seats\" real\n);\n\nQuestion: with a share of 44.2% and 77 seats, what is the greatest seat total?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_seats\") FROM \"general_election_results\" WHERE \"seats\"=77 AND \"share_of_votes\"='44.2%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What is the long in 1994?"
},
{
"role": "assistant",
"content": "SELECT \"long\" FROM \"regular_season\" WHERE \"year\"='1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: Which team has a long of 67?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"regular_season\" WHERE \"long\"='67';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What is the RAvg of the year with Ratt of 9?"
},
{
"role": "assistant",
"content": "SELECT \"r_avg\" FROM \"regular_season\" WHERE \"r_att\"='9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What is the Ratt of the year with a 78 long?"
},
{
"role": "assistant",
"content": "SELECT \"r_att\" FROM \"regular_season\" WHERE \"long\"='78';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: Which team has a Ravg of 1.3?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"regular_season\" WHERE \"r_avg\"='1.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"year\" text,\n \"team\" text,\n \"comp\" text,\n \"long\" text,\n \"rate\" text,\n \"r_att\" text,\n \"r_yds\" text,\n \"r_avg\" text\n);\n\nQuestion: What is the rate of 17 years?"
},
{
"role": "assistant",
"content": "SELECT \"rate\" FROM \"regular_season\" WHERE \"year\"='17 years';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"block_a\" text,\n \"goto\" text,\n \"jado\" text,\n \"kakihara\" text,\n \"kanemoto\" text,\n \"minoru\" text,\n \"samurai\" text,\n \"stampede\" text\n);\n\nQuestion: Name the samurai for stampede of t. mask"
},
{
"role": "assistant",
"content": "SELECT \"samurai\" FROM \"2005\" WHERE \"stampede\"='t. mask';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.