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 \"doubles_18_7_11\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What surface was used when she played with Remi Tezuka?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_18_7_11\" WHERE \"partner\"='remi tezuka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"record\" text,\n \"seed\" text,\n \"region\" text,\n \"results\" text\n);\n\nQuestion: What Results has the Record of 28-12?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"ncaa_tournament_results\" WHERE \"record\"='28-12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"record\" text,\n \"seed\" text,\n \"region\" text,\n \"results\" text\n);\n\nQuestion: What Results has a Seed #12 and a Year that's smaller than 1996"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"ncaa_tournament_results\" WHERE \"seed\"='#12' AND \"year\"<1996;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"record\" text,\n \"seed\" text,\n \"region\" text,\n \"results\" text\n);\n\nQuestion: What's the highest Year with the Record of 18-12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"ncaa_tournament_results\" WHERE \"record\"='18-12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"record\" text,\n \"seed\" text,\n \"region\" text,\n \"results\" text\n);\n\nQuestion: What's the highest Year with the Region of Southeast?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"ncaa_tournament_results\" WHERE \"region\"='southeast';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"record\" text,\n \"seed\" text,\n \"region\" text,\n \"results\" text\n);\n\nQuestion: What Record has a Year that's larger than 2012?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"ncaa_tournament_results\" WHERE \"year\">2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the Laker's record when they played against Kansas City Kings?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"opponent\"='kansas city kings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"old_chinese\" (\n \"word\" text,\n \"pronunciation_a\" text,\n \"meaning_a\" text,\n \"pronunciation_b\" text,\n \"meaning_b\" text\n);\n\nQuestion: Name the pronunciation for \u50b3"
},
{
"role": "assistant",
"content": "SELECT \"pronunciation_a\" FROM \"old_chinese\" WHERE \"word\"='\u50b3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"old_chinese\" (\n \"word\" text,\n \"pronunciation_a\" text,\n \"meaning_a\" text,\n \"pronunciation_b\" text,\n \"meaning_b\" text\n);\n\nQuestion: Name the pronunciation for meaning of king"
},
{
"role": "assistant",
"content": "SELECT \"pronunciation_a\" FROM \"old_chinese\" WHERE \"meaning_a\"='king';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"old_chinese\" (\n \"word\" text,\n \"pronunciation_a\" text,\n \"meaning_a\" text,\n \"pronunciation_b\" text,\n \"meaning_b\" text\n);\n\nQuestion: Name the word with pronunciation b of *s\u0268ks"
},
{
"role": "assistant",
"content": "SELECT \"word\" FROM \"old_chinese\" WHERE \"pronunciation_b\"='*s\u0268ks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"old_chinese\" (\n \"word\" text,\n \"pronunciation_a\" text,\n \"meaning_a\" text,\n \"pronunciation_b\" text,\n \"meaning_b\" text\n);\n\nQuestion: Name the pronunciation for meaning b of border, frontier"
},
{
"role": "assistant",
"content": "SELECT \"pronunciation_b\" FROM \"old_chinese\" WHERE \"meaning_b\"='border, frontier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"old_chinese\" (\n \"word\" text,\n \"pronunciation_a\" text,\n \"meaning_a\" text,\n \"pronunciation_b\" text,\n \"meaning_b\" text\n);\n\nQuestion: Name the pronunciation b for meaning of grind"
},
{
"role": "assistant",
"content": "SELECT \"pronunciation_b\" FROM \"old_chinese\" WHERE \"meaning_a\"='grind';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_de_futsal\" (\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What is the 2008 value that was 2nd in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"grand_prix_de_futsal\" WHERE \"2006\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_de_futsal\" (\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What is the average total that is 1st in 2010?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"grand_prix_de_futsal\" WHERE \"2010\"='1st';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_de_futsal\" (\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What is the 2008 value with a 7 in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"grand_prix_de_futsal\" WHERE \"2010\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the Location for the woodburn dragstrip?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"name\"='woodburn dragstrip';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What State has an Opened (closing date if defunct) that shows 1960?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"opened_closing_date_if_defunct\"='1960';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the Location for the route 66 raceway?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"name\"='route 66 raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the Location for the newington international airport?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"name\"='newington international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"name\" text,\n \"location\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the Name with an Opened (closing date if defunct) of 1995 and has a Length of miles (m), in Illinois?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"opened_closing_date_if_defunct\"='1995' AND \"length\"='miles (m)' AND \"state\"='illinois';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_4_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Score with an Opponent that is amanda brown brenda remilton?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_7_4_3\" WHERE \"opponents\"='amanda brown brenda remilton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_4_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Score with an Outcome of runner-up, and a Partner that is elizabeth little?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_7_4_3\" WHERE \"outcome\"='runner-up' AND \"partner\"='elizabeth little';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"four_consecutive_home_runs_by_a_team_in_\" (\n \"team\" text,\n \"date\" text,\n \"opponent\" text,\n \"pitcher\" text,\n \"inn\" text,\n \"venue\" text\n);\n\nQuestion: Who was the pitcher on June 8, 1961?"
},
{
"role": "assistant",
"content": "SELECT \"pitcher\" FROM \"four_consecutive_home_runs_by_a_team_in_\" WHERE \"date\"='june 8, 1961';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"four_consecutive_home_runs_by_a_team_in_\" (\n \"team\" text,\n \"date\" text,\n \"opponent\" text,\n \"pitcher\" text,\n \"inn\" text,\n \"venue\" text\n);\n\nQuestion: What team had the record asscoiated with the 9th inning?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"four_consecutive_home_runs_by_a_team_in_\" WHERE \"inn\"='9th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"four_consecutive_home_runs_by_a_team_in_\" (\n \"team\" text,\n \"date\" text,\n \"opponent\" text,\n \"pitcher\" text,\n \"inn\" text,\n \"venue\" text\n);\n\nQuestion: In what venue did the Boston Red Sox play in?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"four_consecutive_home_runs_by_a_team_in_\" WHERE \"team\"='boston red sox';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"four_consecutive_home_runs_by_a_team_in_\" (\n \"team\" text,\n \"date\" text,\n \"opponent\" text,\n \"pitcher\" text,\n \"inn\" text,\n \"venue\" text\n);\n\nQuestion: Who was the pitcher with the record recorded in the 7th inning?"
},
{
"role": "assistant",
"content": "SELECT \"pitcher\" FROM \"four_consecutive_home_runs_by_a_team_in_\" WHERE \"inn\"='7th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: When David E. Finley was the incumbent what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"south_carolina\" WHERE \"incumbent\"='david e. finley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: When someone was first elected in 1898 what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"south_carolina\" WHERE \"first_elected\"='1898';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What party has an incumbent of Stanyarne Wilson?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"incumbent\"='stanyarne wilson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: When the incumbent was William Elliott, what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"south_carolina\" WHERE \"incumbent\"='william elliott';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What is the 8:00 that has da vinci's inquest as the 9:00?"
},
{
"role": "assistant",
"content": "SELECT \"8_00\" FROM \"wednesday\" WHERE \"9_00\"='da vinci''s inquest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What 10:00 has party of five as 9:30?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"wednesday\" WHERE \"9_30\"='party of five';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: What 9:00 has entertainment tonight as 7:00?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"wednesday\" WHERE \"7_00\"='entertainment tonight';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"results\" WHERE \"score\"='2-1' AND \"competition\"='pl' AND \"date\"='december 22, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Date of april 3, 2007 had what score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"results\" WHERE \"date\"='april 3, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Competition of pl, and a Score of 1-1, and a Opponents of kelantan had what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"results\" WHERE \"competition\"='pl' AND \"score\"='1-1' AND \"opponents\"='kelantan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Venue of klfa stadium, cheras, and a Score of 3-3 had what competition?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"results\" WHERE \"venue\"='klfa stadium, cheras' AND \"score\"='3-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Opponents of police, and a Venue of selayang municipal council stadium had what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"results\" WHERE \"opponents\"='police' AND \"venue\"='selayang municipal council stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Competition of fa cup rd 1 had what venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"competition\"='fa cup rd 1';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visiting team on January 27?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"date\"='january 27';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the home team that played on February 25?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"date\"='february 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the date with chicago visiting"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"november\" WHERE \"visitor\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the home with chicago visiting"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"november\" WHERE \"visitor\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"goals\" real,\n \"apps\" real,\n \"avge\" real,\n \"career\" text\n);\n\nQuestion: What is the highest number of apps of the player with more than 63 goals and an avge of 0.45?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"apps\") FROM \"top_goalscorers\" WHERE \"goals\">63 AND \"avge\"=0.45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"goals\" real,\n \"apps\" real,\n \"avge\" real,\n \"career\" text\n);\n\nQuestion: What is the total avge of John Hall, who has less than 63 goals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"avge\") FROM \"top_goalscorers\" WHERE \"name\"='john hall' AND \"goals\"<63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"champion\" text,\n \"venue\" text,\n \"location\" text,\n \"score\" text\n);\n\nQuestion: When did Kim Thompson win with 278 score?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"winners\" WHERE \"score\"='278' AND \"champion\"='kim thompson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"champion\" text,\n \"venue\" text,\n \"location\" text,\n \"score\" text\n);\n\nQuestion: Where did Steve Gotsche win?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"champion\"='steve gotsche';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed_buildings\" (\n \"rank\" real,\n \"building\" text,\n \"city\" text,\n \"height_m_ft\" text,\n \"built\" real\n);\n\nQuestion: What is the sum of Rank with a build year earlier than 2007 for the howard johnson hotel bucharest?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"completed_buildings\" WHERE \"built\"<2007 AND \"building\"='howard johnson hotel bucharest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed_buildings\" (\n \"rank\" real,\n \"building\" text,\n \"city\" text,\n \"height_m_ft\" text,\n \"built\" real\n);\n\nQuestion: What is the Height (m/ft) for bucharest Built in 2009, and a Rank of 13?"
},
{
"role": "assistant",
"content": "SELECT \"height_m_ft\" FROM \"completed_buildings\" WHERE \"city\"='bucharest' AND \"built\"=2009 AND \"rank\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed_buildings\" (\n \"rank\" real,\n \"building\" text,\n \"city\" text,\n \"height_m_ft\" text,\n \"built\" real\n);\n\nQuestion: What city is the bucharest tower center (btc) located in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"completed_buildings\" WHERE \"building\"='bucharest tower center (btc)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed_buildings\" (\n \"rank\" real,\n \"building\" text,\n \"city\" text,\n \"height_m_ft\" text,\n \"built\" real\n);\n\nQuestion: What is the name of the building in Bucharest with a rank of less than 12?"
},
{
"role": "assistant",
"content": "SELECT \"building\" FROM \"completed_buildings\" WHERE \"city\"='bucharest' AND \"rank\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"completed_buildings\" (\n \"rank\" real,\n \"building\" text,\n \"city\" text,\n \"height_m_ft\" text,\n \"built\" real\n);\n\nQuestion: What city was the building built in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"completed_buildings\" WHERE \"built\"=1988;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boston_bruins_4_hartford_whalers_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the Boston Bruins game from April 11?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"boston_bruins_4_hartford_whalers_2\" WHERE \"home\"='boston bruins' AND \"date\"='april 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boston_bruins_4_hartford_whalers_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the Hartford Whalers home team with the April 13 game date?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"boston_bruins_4_hartford_whalers_2\" WHERE \"home\"='hartford whalers' AND \"date\"='april 13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boston_bruins_4_hartford_whalers_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the visiting Hartford Whalers game from April 11?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"boston_bruins_4_hartford_whalers_2\" WHERE \"visitor\"='hartford whalers' AND \"date\"='april 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_portla\" (\n \"rank\" real,\n \"airport\" text,\n \"metropolitan_area\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: Which Passengers have Carriers of air canada?"
},
{
"role": "assistant",
"content": "SELECT \"passengers\" FROM \"busiest_international_routes_from_portla\" WHERE \"carriers\"='air canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_portla\" (\n \"rank\" real,\n \"airport\" text,\n \"metropolitan_area\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: Which Metropolitan area has Passengers larger than 130,903, and a Rank of 4?"
},
{
"role": "assistant",
"content": "SELECT \"metropolitan_area\" FROM \"busiest_international_routes_from_portla\" WHERE \"passengers\">'130,903' AND \"rank\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_portla\" (\n \"rank\" real,\n \"airport\" text,\n \"metropolitan_area\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: Which Metropolitan area has an Airport of toronto pearson international airport?"
},
{
"role": "assistant",
"content": "SELECT \"metropolitan_area\" FROM \"busiest_international_routes_from_portla\" WHERE \"airport\"='toronto pearson international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_of_polling\" text,\n \"link\" text,\n \"liberal\" real,\n \"green\" real\n);\n\nQuestion: What is the link for january 31 \u2013 february 3, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"link\" FROM \"opinion_polls\" WHERE \"date_of_polling\"='january 31 \u2013 february 3, 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_of_polling\" text,\n \"link\" text,\n \"liberal\" real,\n \"green\" real\n);\n\nQuestion: On what date of polling was the Polling Firm forum research with 7 green and less than 30 liberals?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_polling\" FROM \"opinion_polls\" WHERE \"polling_firm\"='forum research' AND \"green\"=7 AND \"liberal\"<30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_of_polling\" text,\n \"link\" text,\n \"liberal\" real,\n \"green\" real\n);\n\nQuestion: Which september 26\u201328, 2011 polling firm had a Link of html, less than 36 liberals, and less than 8 green?"
},
{
"role": "assistant",
"content": "SELECT \"polling_firm\" FROM \"opinion_polls\" WHERE \"link\"='html' AND \"liberal\"<36 AND \"green\"<8 AND \"date_of_polling\"='september 26\u201328, 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_of_polling\" text,\n \"link\" text,\n \"liberal\" real,\n \"green\" real\n);\n\nQuestion: What june 21\u201322, 2011 polling has green smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT \"polling_firm\" FROM \"opinion_polls\" WHERE \"green\"<13 AND \"date_of_polling\"='june 21\u201322, 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_skyscrapers_in_afric\" (\n \"name\" text,\n \"city\" text,\n \"years_as_tallest\" text,\n \"metres\" real,\n \"feet\" real,\n \"floors\" real\n);\n\nQuestion: What is listed under the Years as tallest, that has Floors of 31?"
},
{
"role": "assistant",
"content": "SELECT \"years_as_tallest\" FROM \"timeline_of_tallest_skyscrapers_in_afric\" WHERE \"floors\"=31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_skyscrapers_in_afric\" (\n \"name\" text,\n \"city\" text,\n \"years_as_tallest\" text,\n \"metres\" real,\n \"feet\" real,\n \"floors\" real\n);\n\nQuestion: What's the lowest Floors with Feet that's larger htan 262, has a Name of Standard Bank Building, and Metres that's larger htan 138.8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"floors\") FROM \"timeline_of_tallest_skyscrapers_in_afric\" WHERE \"feet\">262 AND \"name\"='standard bank building' AND \"metres\">138.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_skyscrapers_in_afric\" (\n \"name\" text,\n \"city\" text,\n \"years_as_tallest\" text,\n \"metres\" real,\n \"feet\" real,\n \"floors\" real\n);\n\nQuestion: What is the sum of Metres wiht a Feet that's smaller than 196?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"metres\") FROM \"timeline_of_tallest_skyscrapers_in_afric\" WHERE \"feet\"<196;"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest week number that there was a game on October 23, 1977 with less than 68,977 people attending?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"<'68,977' AND \"date\"='october 23, 1977';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_squad\" (\n \"player\" text,\n \"position\" text,\n \"height_m\" real,\n \"weight_kg\" real,\n \"years\" text\n);\n\nQuestion: What is the highest weight of the position scrum half?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"weight_kg\") FROM \"2008_2009_squad\" WHERE \"position\"='scrum half';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"engine\" text,\n \"type\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the power of the engine with a torque of n\u00b7m (lb\u00b7ft) at1,500rpm?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"engines\" WHERE \"torque\"='n\u00b7m (lb\u00b7ft) at1,500rpm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"engine\" text,\n \"type\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: Which torque value is associated with the 1.3 16V multijet engine?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"engine\"='1.3 16v multijet';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest against value with less than 2 draws, 10 points, and less than 4 lost?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"drawn\"<2 AND \"points\"=10 AND \"lost\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average position with an against value less than 11?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"torneio_rio_s_o_paulo\" WHERE \"against\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the largest value for lost with a position greater than 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"torneio_rio_s_o_paulo\" WHERE \"position\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the total of all against values for the Corinthians with less than 3 lost?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"team\"='corinthians' AND \"lost\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest against value with less than 9 points and more than 6 lost?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"points\"<9 AND \"lost\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What tournament located is mississippi was nov 5"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"tournament_results\" WHERE \"date\"='nov 5' AND \"location\"='mississippi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: what is the 1st prize for may 21"
},
{
"role": "assistant",
"content": "SELECT SUM(\"1st_prize\") FROM \"tournament_results\" WHERE \"date\"='may 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_no_4\" (\n \"title\" text,\n \"year\" real,\n \"platform_s\" text,\n \"director\" text,\n \"producer\" text\n);\n\nQuestion: Who is the director of the game with HIroshi Sato as the producer on the GBA platform?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"group_no_4\" WHERE \"producer\"='hiroshi sato' AND \"platform_s\"='gba';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_no_4\" (\n \"title\" text,\n \"year\" real,\n \"platform_s\" text,\n \"director\" text,\n \"producer\" text\n);\n\nQuestion: Who is the director of Last Window: The Secret of Cape West 3?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"group_no_4\" WHERE \"title\"='last window: the secret of cape west 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_no_4\" (\n \"title\" text,\n \"year\" real,\n \"platform_s\" text,\n \"director\" text,\n \"producer\" text\n);\n\nQuestion: What is the platform of the 2010 game with Shuichiro Nishiya as director?"
},
{
"role": "assistant",
"content": "SELECT \"platform_s\" FROM \"group_no_4\" WHERE \"year\"=2010 AND \"director\"='shuichiro nishiya';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Opponent is on October of 29?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"october\"=29;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: WHich October has a Record of 1\u20130\u20130?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"october\") FROM \"regular_season\" WHERE \"record\"='1\u20130\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Opponent has a October larger than 20 with a Score of 2\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"october\">20 AND \"score\"='2\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_major_championship\" (\n \"year\" real,\n \"dates\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What year was the margin of victory 9 strokes and the purse under $2,750,000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"lpga_major_championship\" WHERE \"margin_of_victory\"='9 strokes' AND \"purse\"<'2,750,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_major_championship\" (\n \"year\" real,\n \"dates\" text,\n \"venue\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What year was the score 269?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"lpga_major_championship\" WHERE \"score\"=269;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the average number of points for a team in the 250cc class with fewer than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='250cc' AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the smallest number of points for a 1981 team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"year\"=1981;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the fewest number of wins for a team ranked 8th with fewer than 32 points in the 350cc class?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"points\"<32 AND \"class\"='350cc' AND \"rank\"='8th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What was the rank of the 1983 team in the 250cc class?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='250cc' AND \"year\"=1983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which district has joseph t. johnson as an incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"south_carolina\" WHERE \"incumbent\"='joseph t. johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What was the result for james o'h. patterson when first elected in 1904?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"south_carolina\" WHERE \"first_elected\"='1904' AND \"incumbent\"='james o''h. patterson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which party was re-elected in south carolina 5 district?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"result\"='re-elected' AND \"district\"='south carolina 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which party was joseph t. johnson in?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"incumbent\"='joseph t. johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which party was first elected in 1898?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"first_elected\"='1898';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Which district won when first elected in 1900?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"south_carolina\" WHERE \"first_elected\"='1900';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: How many wins did the player who earned $6,607,562 have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"earnings\"='6,607,562';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the average earnings made by Greg Norman?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"earnings\") FROM \"leaders\" WHERE \"player\"='greg norman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: what city has a game of friendly and an opponent of tunisia?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1973\" WHERE \"type_of_game\"='friendly' AND \"opponent\"='tunisia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: what are the results of the opponent of spain?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"1973\" WHERE \"opponent\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: what results are dated december 19?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"1973\" WHERE \"date\"='december 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: what city has the results of 4:2?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1973\" WHERE \"results\"='4:2';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.