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 \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want the time/retired for grid of 24"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=24;"
}
] |
[
{
"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: I want the driver for ferrari who made Laps less than 26 and grids more than 9"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\">9 AND \"laps\"<26 AND \"constructor\"='ferrari';"
}
] |
[
{
"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: Tell me the total number of grid for laps of 52"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"laps\"=52;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\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 record for january 10?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"date\"='january 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\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 score on january 5 with a hasek decision?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"january\" WHERE \"decision\"='hasek' AND \"date\"='january 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What Club team has an average of 8, plays kaj linna, and has an overall larger than 131?"
},
{
"role": "assistant",
"content": "SELECT \"club_team\" FROM \"1995_draft_picks\" WHERE \"overall\">131 AND \"round\"=8 AND \"player\"='kaj linna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1995_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What round does Bryan Berard do?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"1995_draft_picks\" WHERE \"player\"='bryan berard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_of_the_great_eastern_railway\" (\n \"ship_s_name\" text,\n \"entered_service\" text,\n \"ended_service\" text,\n \"gross_tonnage\" real,\n \"type_of_vessel\" text\n);\n\nQuestion: Tell me the average gross tonnage for april 1919 entered service"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gross_tonnage\") FROM \"ships_of_the_great_eastern_railway\" WHERE \"entered_service\"='april 1919';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_of_the_great_eastern_railway\" (\n \"ship_s_name\" text,\n \"entered_service\" text,\n \"ended_service\" text,\n \"gross_tonnage\" real,\n \"type_of_vessel\" text\n);\n\nQuestion: I want the total number of gross tonnage when entered service was 1903"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gross_tonnage\") FROM \"ships_of_the_great_eastern_railway\" WHERE \"entered_service\"='1903';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: what is the rank when the player is henry shefflin and the matches is higher than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"season\" WHERE \"player\"='henry shefflin' AND \"matches\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: what is the rank when the total is 39 in the county of dublin and the matches is less than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"season\" WHERE \"total\"=39 AND \"county\"='dublin' AND \"matches\"<4;"
}
] |
[
{
"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: Who was the opponent on November 12, 1972?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 12, 1972';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emd\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: Who built the train in 1966 with over 40 produced?"
},
{
"role": "assistant",
"content": "SELECT \"builder_s_model\" FROM \"emd\" WHERE \"total_produced\">40 AND \"build_date\"='1966';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emd\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What is the PRR class of the freight train built in 1967 with a b-b wheel arrangement?"
},
{
"role": "assistant",
"content": "SELECT \"prr_class\" FROM \"emd\" WHERE \"wheel_arrangement\"='b-b' AND \"service\"='freight' AND \"build_date\"='1967';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emd\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What PRR class has a Wheel arrangement of a1a-a1a?"
},
{
"role": "assistant",
"content": "SELECT \"prr_class\" FROM \"emd\" WHERE \"wheel_arrangement\"='a1a-a1a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"stations\" text,\n \"place\" text,\n \"managed_by\" text,\n \"platforms\" real,\n \"zone\" real\n);\n\nQuestion: Which Zone is the lowest when Managed By Southern and has Platforms under 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"zone\") FROM \"c\" WHERE \"managed_by\"='southern' AND \"platforms\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"stations\" text,\n \"place\" text,\n \"managed_by\" text,\n \"platforms\" real,\n \"zone\" real\n);\n\nQuestion: What would be the highest Platforms for the Centrale Tram Stop Stations?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"platforms\") FROM \"c\" WHERE \"stations\"='centrale tram stop';"
}
] |
[
{
"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: How many grids had more than 61 laps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"laps\">61;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick\" real,\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: When parnell dickinson was the player and the rounds were under 7, what's the highest pick?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='parnell dickinson' AND \"round\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick\" real,\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: When the school picking is utah state for the position of linebacker, what's the sum of those rounds?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"nfl_draft\" WHERE \"position\"='linebacker' AND \"school\"='utah state';"
}
] |
[
{
"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: what is the laps when the grid is less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"classification\" WHERE \"grid\"<2;"
}
] |
[
{
"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: who is the constructor when the grid is more than 23 and the driver is piercarlo ghinzani?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"grid\">23 AND \"driver\"='piercarlo ghinzani';"
}
] |
[
{
"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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: When is the latest year the venue is in gothenburg, sweden?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"venue\"='gothenburg, sweden';"
}
] |
[
{
"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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: When is the earliest year the venue is in gothenburg, sweden?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"venue\"='gothenburg, sweden';"
}
] |
[
{
"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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the result of the european indoor championships after 1974?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"achievements\" WHERE \"tournament\"='european indoor championships' AND \"year\">1974;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In Western Oval, what was the away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_5\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: What is the place number for adrian vasile with less than 127.74 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"places\") FROM \"men\" WHERE \"name\"='adrian vasile' AND \"points\"<127.74;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"sp_fs\" real,\n \"points\" real,\n \"places\" real\n);\n\nQuestion: What is the highest SP+FS that has 131.02 Points, and a Rank larger than 15?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"sp_fs\") FROM \"men\" WHERE \"points\"=131.02 AND \"rank\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the highest evening gown score of the contestant from Tennessee with an interview score larger than 9.36 and an average larger than 9.75 have?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"evening_gown\") FROM \"final_competition_scores\" WHERE \"interview\">9.36 AND \"country\"='tennessee' AND \"average\">9.75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the average of the contestant with a swimsuit less than 9.32?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"final_competition_scores\" WHERE \"swimsuit\"<9.32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the highest swimsuit score of the contestant with a higher than 9.55 interview score, and evening gown of 9.75, and an average higher than 9.67?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"swimsuit\") FROM \"final_competition_scores\" WHERE \"interview\">9.55 AND \"evening_gown\"=9.75 AND \"average\">9.67;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the country of the contestant with a swimsuit of 9.46?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_competition_scores\" WHERE \"swimsuit\"=9.46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"shunsuke_nakamura_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On what date did Goal 24 take place?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"shunsuke_nakamura_international_goals\" WHERE \"goal\"=24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the team 2 for team 1 of Valletta?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"first_qualifying_round\" WHERE \"team_1\"='valletta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who played defensive when the rookie Craig Point was playing during week 6?"
},
{
"role": "assistant",
"content": "SELECT \"defensive\" FROM \"weekly_awards\" WHERE \"rookie\"='craig point' AND \"week\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: What was the first week that had a transition with Pat Mccready?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"weekly_awards\" WHERE \"transition\"='pat mccready';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who was the rookie who played when Matt Vinc was defensive and Pat Maddalena was offensive?"
},
{
"role": "assistant",
"content": "SELECT \"rookie\" FROM \"weekly_awards\" WHERE \"defensive\"='matt vinc' AND \"offensive\"='pat maddalena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who played as overall when Josh Sims was transition?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"weekly_awards\" WHERE \"transition\"='josh sims';"
}
] |
[
{
"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: How large was the crowd at Glenferrie Oval?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_4\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_cast\" (\n \"actor\" text,\n \"character\" text,\n \"title_rank\" text,\n \"series\" text,\n \"years\" text\n);\n\nQuestion: who is the actor of the character ariadne oliver?"
},
{
"role": "assistant",
"content": "SELECT \"actor\" FROM \"regular_cast\" WHERE \"character\"='ariadne oliver';"
}
] |
[
{
"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: What is the largest grid with a Driver of ralph firman, and a Lap smaller than 18?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"driver\"='ralph firman' AND \"laps\"<18;"
}
] |
[
{
"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: What time/retired has a Grid larger than 3, and a Driver of kimi r\u00e4ikk\u00f6nen?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\">3 AND \"driver\"='kimi r\u00e4ikk\u00f6nen';"
}
] |
[
{
"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 \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the score on December 31?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"december\" WHERE \"date\"='december 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" real,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What's the lowest team 1 number that had asolo fonte (veneto b) as the Agg.?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"team_1\") FROM \"second_round\" WHERE \"agg\"='asolo fonte (veneto b)';"
}
] |
[
{
"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: What is the grid total for kazuyoshi hoshino with under 71 laps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"driver\"='kazuyoshi hoshino' AND \"laps\"<71;"
}
] |
[
{
"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: What driver has grid 2 and over 72 laps?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\">72 AND \"grid\"=2;"
}
] |
[
{
"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: What is the time/retired for grid 23?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\"=23;"
}
] |
[
{
"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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average of the top-25 of those with less than 35 events in the Open Championship?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"events\"<35 AND \"tournament\"='the open championship';"
}
] |
[
{
"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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total number of events the Open Championship has with less than 0 cuts?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"events\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"cuts_made\"<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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total number of events with a top-25 less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"events\") FROM \"summary\" WHERE \"top_25\"<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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total number of top-25 with a top-10 bigger than 2 and less than 29 cuts?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"top_25\") FROM \"summary\" WHERE \"top_10\">2 AND \"cuts_made\"<29;"
}
] |
[
{
"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_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest number of events the Open Championship has with a less than 0 top-10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"events\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"top_10\"<0;"
}
] |
[
{
"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 score for the away team when they played Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_19\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_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 the home team when the away team scored 8.7 (55)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_4\" 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_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 did Footscray play against when they scored 14.12 (96)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" 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_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: How many were in attendance when the away team scored 8.13 (61)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_4\" WHERE \"away_team_score\"='8.13 (61)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which result has a Score of 30-44?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2001_fixtures_and_results\" WHERE \"score\"='30-44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which venue has h.paul 8/9 goals?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2001_fixtures_and_results\" WHERE \"goals\"='h.paul 8/9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What is the score at valley parade on 10/6/01?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"2001_fixtures_and_results\" WHERE \"venue\"='valley parade' AND \"date\"='10/6/01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which competition has a Date of 16/4/01?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"2001_fixtures_and_results\" WHERE \"date\"='16/4/01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"7_seats\" (\n \"riding\" text,\n \"candidate\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What is the occupation of the candidate that has a riding of labrador?"
},
{
"role": "assistant",
"content": "SELECT \"occupation\" FROM \"7_seats\" WHERE \"riding\"='labrador';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_sinclair_totals_throughout_the_h\" (\n \"weight_class_kg\" real,\n \"world_record_kg\" text,\n \"sinclair_coefficient\" real,\n \"sinclair_total\" real,\n \"rank\" real\n);\n\nQuestion: What is the average sinclair coefficient with a Sinclair Total of 477.2772023, and a Weight Class (kg) larger than 105?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"sinclair_coefficient\") FROM \"notable_sinclair_totals_throughout_the_h\" WHERE \"sinclair_total\"=477.2772023 AND \"weight_class_kg\">105;"
}
] |
[
{
"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: Name the least attendance for may 6"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"game_log\" WHERE \"date\"='may 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"satellite_television\" (\n \"channel\" real,\n \"name\" text,\n \"language\" text,\n \"owner\" text,\n \"group\" text,\n \"type\" text\n);\n\nQuestion: Which ESPN international sports owner speaks English?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"satellite_television\" WHERE \"language\"='english' AND \"name\"='espn international sports';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"satellite_television\" (\n \"channel\" real,\n \"name\" text,\n \"language\" text,\n \"owner\" text,\n \"group\" text,\n \"type\" text\n);\n\nQuestion: Which type is filed under the Group Animated?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"satellite_television\" WHERE \"group\"='animated';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Date has an Opponent of newcastle united, and a Result of 2\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fa_premier_league\" WHERE \"opponent\"='newcastle united' AND \"result\"='2\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Date has an Opponent of manchester united, and a Venue A?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fa_premier_league\" WHERE \"opponent\"='manchester united' AND \"venue\"='a';"
}
] |
[
{
"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: In the game where Collingwood is the home team what is the score of the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_9\" 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_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 is the home teamscore for Richmond?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"at_home_prize\" (\n \"season\" text,\n \"contestant\" text,\n \"height\" text,\n \"start_bmi\" real,\n \"start_weight\" real,\n \"recent_bmi\" text\n);\n\nQuestion: What contestant had a starting BMI of 42.2?"
},
{
"role": "assistant",
"content": "SELECT \"contestant\" FROM \"at_home_prize\" WHERE \"start_bmi\"=42.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"at_home_prize\" (\n \"season\" text,\n \"contestant\" text,\n \"height\" text,\n \"start_bmi\" real,\n \"start_weight\" real,\n \"recent_bmi\" text\n);\n\nQuestion: What is the recent BMI on season 8 for the person who's BMI started under 46.3?"
},
{
"role": "assistant",
"content": "SELECT \"recent_bmi\" FROM \"at_home_prize\" WHERE \"start_bmi\"<46.3 AND \"season\"='season 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which college has a pick below 6 for the PBA team the Shell Turbo Chargers?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_1\" WHERE \"pick\"<6 AND \"pba_team\"='shell turbo chargers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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's the crowd population of the home team located in Richmond?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_11\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 visiting team that has a home team related to footscray?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Venue has a Home team score of 13.13 (91)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_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_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team has an Away team of fitzroy?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did the home team score 13.14 (92)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_17\" WHERE \"home_team_score\"='13.14 (92)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team that scored 12.17 (89)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"away_team_score\"='12.17 (89)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did the home team score 14.21 (105) with a crowd larger than 13,828?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_17\" WHERE \"crowd\">'13,828' AND \"home_team_score\"='14.21 (105)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score when the away team was South Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score when the away team was Hawthorn and there was a crowd larger than 20,851?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"crowd\">'20,851' 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 \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue is the home field of Richmond?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the away team in the match at Princes Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_18\" WHERE \"venue\"='princes park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the home team in the match at Western Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_28_09\" text,\n \"ifop_5_30_09\" text,\n \"ipsos_5_30_09\" text,\n \"bva_6_1_09\" text,\n \"tns_sofres_6_2_09\" text,\n \"opinion_way_6_3_09\" text,\n \"ipsos_6_3_09\" text,\n \"tns_sofres_6_4_09\" text,\n \"csa_6_4_09\" text,\n \"ifop_6_4_09\" text\n);\n\nQuestion: Who had an Iflop of 2.5%?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"polling\" WHERE \"ifop_5_30_09\"='2.5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_28_09\" text,\n \"ifop_5_30_09\" text,\n \"ipsos_5_30_09\" text,\n \"bva_6_1_09\" text,\n \"tns_sofres_6_2_09\" text,\n \"opinion_way_6_3_09\" text,\n \"ipsos_6_3_09\" text,\n \"tns_sofres_6_4_09\" text,\n \"csa_6_4_09\" text,\n \"ifop_6_4_09\" text\n);\n\nQuestion: When BVA was 3%, what was the Ipsos?"
},
{
"role": "assistant",
"content": "SELECT \"ipsos_5_30_09\" FROM \"polling\" WHERE \"bva_6_1_09\"='3%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_28_09\" text,\n \"ifop_5_30_09\" text,\n \"ipsos_5_30_09\" text,\n \"bva_6_1_09\" text,\n \"tns_sofres_6_2_09\" text,\n \"opinion_way_6_3_09\" text,\n \"ipsos_6_3_09\" text,\n \"tns_sofres_6_4_09\" text,\n \"csa_6_4_09\" text,\n \"ifop_6_4_09\" text\n);\n\nQuestion: Who had an Ipsos of 27%?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"polling\" WHERE \"ipsos_6_3_09\"='27%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_28_09\" text,\n \"ifop_5_30_09\" text,\n \"ipsos_5_30_09\" text,\n \"bva_6_1_09\" text,\n \"tns_sofres_6_2_09\" text,\n \"opinion_way_6_3_09\" text,\n \"ipsos_6_3_09\" text,\n \"tns_sofres_6_4_09\" text,\n \"csa_6_4_09\" text,\n \"ifop_6_4_09\" text\n);\n\nQuestion: What was the TNS-Sofres when the Iflop was 5%?"
},
{
"role": "assistant",
"content": "SELECT \"tns_sofres_6_2_09\" FROM \"polling\" WHERE \"ifop_5_30_09\"='5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_28_09\" text,\n \"ifop_5_30_09\" text,\n \"ipsos_5_30_09\" text,\n \"bva_6_1_09\" text,\n \"tns_sofres_6_2_09\" text,\n \"opinion_way_6_3_09\" text,\n \"ipsos_6_3_09\" text,\n \"tns_sofres_6_4_09\" text,\n \"csa_6_4_09\" text,\n \"ifop_6_4_09\" text\n);\n\nQuestion: Who had 0.00% in 2004?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"polling\" WHERE \"results_2004\"='0.00%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_28_09\" text,\n \"ifop_5_30_09\" text,\n \"ipsos_5_30_09\" text,\n \"bva_6_1_09\" text,\n \"tns_sofres_6_2_09\" text,\n \"opinion_way_6_3_09\" text,\n \"ipsos_6_3_09\" text,\n \"tns_sofres_6_4_09\" text,\n \"csa_6_4_09\" text,\n \"ifop_6_4_09\" text\n);\n\nQuestion: What's the TNS-Sofres when Ipsos was 27%?"
},
{
"role": "assistant",
"content": "SELECT \"tns_sofres_6_2_09\" FROM \"polling\" WHERE \"ipsos_6_3_09\"='27%';"
}
] |
[
{
"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: In the match that had an away score of 11.19 (85), what was the date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_3\" WHERE \"away_team_score\"='11.19 (85)';"
}
] |
[
{
"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: In the match where fitzroy was the away team, where was the venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_3\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which Stage (Winner) has a Vladimir Karpets General classification and a Team classification of relax-gam, and a Points classification of Denis Menchov?"
},
{
"role": "assistant",
"content": "SELECT \"stage_winner\" FROM \"jersey_progress\" WHERE \"general_classification\"='vladimir karpets' AND \"team_classification\"='relax-gam' AND \"points_classification\"='denis menchov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which Team classification has a General classification of Vladimir Karpets and a Mountains classification of No Award?"
},
{
"role": "assistant",
"content": "SELECT \"team_classification\" FROM \"jersey_progress\" WHERE \"general_classification\"='vladimir karpets' AND \"mountains_classification\"='no award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What Sprints classification has the Points classification, Mark Cavendish and Team classification, Caisse D'epargne?"
},
{
"role": "assistant",
"content": "SELECT \"sprints_classification\" FROM \"jersey_progress\" WHERE \"points_classification\"='mark cavendish' AND \"team_classification\"='caisse d''epargne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"place\" real,\n \"name\" text,\n \"from\" real,\n \"until\" real,\n \"titles\" text,\n \"seconds\" text,\n \"thirds\" text\n);\n\nQuestion: How many in the From category had thirds of exactly 2 and an Until stat of 2002?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"from\") FROM \"women\" WHERE \"thirds\"='2' AND \"until\"=2002;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"place\" real,\n \"name\" text,\n \"from\" real,\n \"until\" real,\n \"titles\" text,\n \"seconds\" text,\n \"thirds\" text\n);\n\nQuestion: What is the second number when from is prior to 2006 and the thirds number was 4?"
},
{
"role": "assistant",
"content": "SELECT \"seconds\" FROM \"women\" WHERE \"from\"<2006 AND \"thirds\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"place\" real,\n \"name\" text,\n \"from\" real,\n \"until\" real,\n \"titles\" text,\n \"seconds\" text,\n \"thirds\" text\n);\n\nQuestion: What is the total Until when the Titles was 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"until\") FROM \"women\" WHERE \"titles\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: When Team 1 is Aalborg BK, what is the 1st Leg?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"second_qualifying_round\" WHERE \"team_1\"='aalborg bk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: When Partizan is Team 2, what is the Agg?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"second_qualifying_round\" WHERE \"team_2\"='partizan';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.