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 \"wins_13\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score in the u.s. women's open that was won by 5 strokes?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_13\" WHERE \"championship\"='u.s. women''s open' AND \"margin\"='5 strokes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when High Rebounds is \"Marcus Camby (15)\", and when High Assists is \"Baron Davis (7)\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"high_rebounds\"='marcus camby (15)' AND \"high_assists\"='baron davis (7)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Game, when Team is \"Philadelphia\""
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"team\"='philadelphia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Assists, when Team is \"@ Milwaukee\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"team\"='@ milwaukee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the tie number for the round against visiting opponent Chelsea?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"tie_no\") FROM \"fourth_round\" WHERE \"away_team\"='chelsea';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the tie number for the round against visiting opponent Newcastle United?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fourth_round\" WHERE \"away_team\"='newcastle united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was Millwall the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"home_team\"='millwall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was Leeds United the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='leeds united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when Bolton Wanderers were the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"away_team\"='bolton wanderers';"
}
] |
[
{
"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 of events when the tournament was U.S. Open and the Top-25 was less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"events\") FROM \"summary\" WHERE \"tournament\"='u.s. open' AND \"top_25\"<1;"
}
] |
[
{
"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: How many total wins have 3 as the Top-35 and less than 5 cuts made?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"summary\" WHERE \"top_25\"=3 AND \"cuts_made\"<5;"
}
] |
[
{
"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 minimum Top-10 when the Open Championship was the tournament and the wins greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"top_10\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: With wins greater than 0 what is the minimum Top-10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"top_10\") FROM \"summary\" WHERE \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total Top-25 when the events were less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"top_25\") FROM \"summary\" WHERE \"events\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who is the player from the United States with a score of 71-75=146?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"country\"='united states' AND \"score\"='71-75=146';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who is the player with a 77-68=145 score?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='77-68=145';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the country with a 76-68=144 score?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='76-68=144';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who is the player in t8 place with a 75-71=146 score?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='t8' AND \"score\"='75-71=146';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par of the player from the United States with a place of t1 and a 76-68=144 score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='united states' AND \"place\"='t1' AND \"score\"='76-68=144';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the country of player lee trevino, who has a to par of +2?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"to_par\"='+2' AND \"player\"='lee trevino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_holders\" (\n \"speed\" text,\n \"craft\" text,\n \"pilot_s\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: Who was the pilot at lake dumbleyung?"
},
{
"role": "assistant",
"content": "SELECT \"pilot_s\" FROM \"record_holders\" WHERE \"location\"='lake dumbleyung';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_holders\" (\n \"speed\" text,\n \"craft\" text,\n \"pilot_s\" text,\n \"location\" text,\n \"date\" text\n);\n\nQuestion: How fast was the speed during the record set at Coniston Water that was piloted by Malcolm Campbell?"
},
{
"role": "assistant",
"content": "SELECT \"speed\" FROM \"record_holders\" WHERE \"location\"='coniston water' AND \"pilot_s\"='malcolm campbell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_rivals\" (\n \"season\" text,\n \"league\" text,\n \"teams\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which Home has an Away of 1\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"local_rivals\" WHERE \"away\"='1\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_rivals\" (\n \"season\" text,\n \"league\" text,\n \"teams\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which Away has a Season of 2007\u201308?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"local_rivals\" WHERE \"season\"='2007\u201308';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_rivals\" (\n \"season\" text,\n \"league\" text,\n \"teams\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which Season has an Away of 1\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"local_rivals\" WHERE \"away\"='1\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_rivals\" (\n \"season\" text,\n \"league\" text,\n \"teams\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which Away has a Home of 1\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"local_rivals\" WHERE \"home\"='1\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_rivals\" (\n \"season\" text,\n \"league\" text,\n \"teams\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which Season has a League of bezirksliga?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"local_rivals\" WHERE \"league\"='bezirksliga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"local_rivals\" (\n \"season\" text,\n \"league\" text,\n \"teams\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which Season has a Home of 0\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"local_rivals\" WHERE \"home\"='0\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Venue in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What Competition had a Score of 3\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='3\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Name the lowest Round with Opponent of rolando delgado?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='rolando delgado';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Name the total number of Round in liverpool , england?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"location\"='liverpool , england';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Event is in chandigarh , india?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='chandigarh , india';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"year\" real,\n \"round\" text,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: Who is the player with a year later than 2007 and the college/high school/club of Arizona?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"selections\" WHERE \"year\">2007 AND \"college_high_school_club\"='arizona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"year\" real,\n \"round\" text,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: What is the earliest year of c position player gary bergen?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"selections\" WHERE \"position\"='c' AND \"player\"='gary bergen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"year\" real,\n \"round\" text,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: What round is sf/sg player sly williams from a year after 1965 from?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"selections\" WHERE \"position\"='sf/sg' AND \"year\">1965 AND \"player\"='sly williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"year\" real,\n \"round\" text,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"college_high_school_club\" text\n);\n\nQuestion: What is the round of the pf position player from 1996 and the college/high school/club mississippi state?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"selections\" WHERE \"position\"='pf' AND \"year\"=1996 AND \"college_high_school_club\"='mississippi state';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has a Visitor of montreal canadiens, and Points of 5?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"visitor\"='montreal canadiens' AND \"points\"=5;"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have an Attendance of 21,273, and a Record of 5\u20131\u20131?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"game_log\" WHERE \"attendance\"='21,273' AND \"record\"='5\u20131\u20131';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Visitor of montreal canadiens, and an Attendance larger than 18,568, and a Record of 2\u20130\u20131?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"game_log\" WHERE \"visitor\"='montreal canadiens' AND \"attendance\">'18,568' AND \"record\"='2\u20130\u20131';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Date has a Home of montreal canadiens, and Points larger than 9, and a Decision of price?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"home\"='montreal canadiens' AND \"points\">9 AND \"decision\"='price';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score for the home team Notts County?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"home_team\"='notts county';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" text,\n \"rating\" real,\n \"share\" real,\n \"viewers_millions\" real,\n \"weekly_rank\" text\n);\n\nQuestion: Which Episode has a Viewers (millions) larger than 11.26, a Weekly Rank of #8, and a Share of 12?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\">11.26 AND \"weekly_rank\"='#8' AND \"share\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" text,\n \"rating\" real,\n \"share\" real,\n \"viewers_millions\" real,\n \"weekly_rank\" text\n);\n\nQuestion: Which Viewers (millions) has an Episode of \"i'm not a good villain\", and a Share smaller than 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"viewers_millions\") FROM \"u_s_nielsen_ratings\" WHERE \"episode\"='\\\"i''m not a good villain\\\"' AND \"share\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2012 with a mini in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"see_also\" WHERE \"2009\"='mini';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2013 with virgin in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"see_also\" WHERE \"2009\"='virgin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the highest rank of the 2009 xbox?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"see_also\" WHERE \"2009\"='xbox';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2010 with a rank higher than 15 and a 2011 maserati?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"see_also\" WHERE \"rank\">15 AND \"2011\"='maserati';"
}
] |
[
{
"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 \"points\" real\n);\n\nQuestion: What is the record with 23 points and a visitor of Chicago?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"points\"=23 AND \"visitor\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"captaincy_record\" (\n \"venue\" text,\n \"span\" text,\n \"matches\" text,\n \"lost\" text,\n \"tied\" text\n);\n\nQuestion: What venue had a tie?"
},
{
"role": "assistant",
"content": "SELECT \"tied\" FROM \"captaincy_record\" WHERE \"venue\"='venue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the score in Spain T3?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t3' AND \"country\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What score did Lee Trevino get in T1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t1' AND \"player\"='lee trevino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which player had the score 71-72=143 in Spain?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='71-72=143' AND \"country\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: When curtis strange had a to par +1, what was his score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"to_par\"='+1' AND \"player\"='curtis strange';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who is the player for Zimbabwe?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"country\"='zimbabwe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Greg Norman from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" 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 \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Bob Tway from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='bob tway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What was the highest number of starts in 2007 when the average start was over 17.6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"starts\") FROM \"nascar_nationwide_series\" WHERE \"year\"=2007 AND \"avg_start\">17.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"driver\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What is the number of wins when the number of third was 1, points were less than 572 and had less than 16 races?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"season_by_season\" WHERE \"third\"='1' AND \"points\"<572 AND \"races\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_matches\" (\n \"date\" text,\n \"team_num1\" text,\n \"res\" text,\n \"team_num2\" text,\n \"competition\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result for the friendly match competition?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"notable_matches\" WHERE \"competition\"='friendly match';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_matches\" (\n \"date\" text,\n \"team_num1\" text,\n \"res\" text,\n \"team_num2\" text,\n \"competition\" text,\n \"attendance\" real\n);\n\nQuestion: What was the team #1 for the match that had a result of 0-3?"
},
{
"role": "assistant",
"content": "SELECT \"team_num1\" FROM \"notable_matches\" WHERE \"res\"='0-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"puerto_rico\" (\n \"2012_rank\" real,\n \"municipio\" text,\n \"2010_land_area\" text,\n \"2010_population_density\" text,\n \"ansi\" real,\n \"location\" text\n);\n\nQuestion: what is the 2010 population density for municipio ponce?"
},
{
"role": "assistant",
"content": "SELECT \"2010_population_density\" FROM \"puerto_rico\" WHERE \"municipio\"='ponce';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award_giving_body\" text,\n \"category\" text,\n \"nominated_for\" text,\n \"result\" text\n);\n\nQuestion: What's the category for the tween academy: class of 2012 nomination?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"nominated_for\"='tween academy: class of 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award_giving_body\" text,\n \"category\" text,\n \"nominated_for\" text,\n \"result\" text\n);\n\nQuestion: How many years was famas awards the award giving body?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"awards_and_nominations\" WHERE \"award_giving_body\"='famas awards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award_giving_body\" text,\n \"category\" text,\n \"nominated_for\" text,\n \"result\" text\n);\n\nQuestion: What's the result for the category of best actor in a supporting role?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"category\"='best actor in a supporting role';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Record has a Date of december 17?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"date\"='december 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Streak has a Team of new york knicks?"
},
{
"role": "assistant",
"content": "SELECT \"streak\" FROM \"season_schedule\" WHERE \"team\"='new york knicks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Date has a Record of 21\u201310?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"record\"='21\u201310';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Team has a Record of 17\u20138?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"season_schedule\" WHERE \"record\"='17\u20138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Date has a Score of 102\u2013113?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"score\"='102\u2013113';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Game has a Streak of loss 1, and a Score of 110\u2013111?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"season_schedule\" WHERE \"streak\"='loss 1' AND \"score\"='110\u2013111';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name of the player who is Sco and moving to greenock morton in the summer?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"out\" WHERE \"nat\"='sco' AND \"transfer_window\"='summer' AND \"moving_to\"='greenock morton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Where is rory loy moving to?"
},
{
"role": "assistant",
"content": "SELECT \"moving_to\" FROM \"out\" WHERE \"name\"='rory loy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer fee for rory loy?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"name\"='rory loy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the date of the game with toronto as the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"final_standings\" WHERE \"visitor\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the date of the game with less than 35 points and chicago as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"final_standings\" WHERE \"points\"<35 AND \"home\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the date of the game with pittsburgh as the home team and boston as the visitor team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"final_standings\" WHERE \"home\"='pittsburgh' AND \"visitor\"='boston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the record of the game with 35 points and pittsburgh as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"final_standings\" WHERE \"home\"='pittsburgh' AND \"points\"=35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What place did bobby wadkins come in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"player\"='bobby wadkins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is the lowest Lane, when Mark is 7.66?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lane\") FROM \"final\" WHERE \"mark\"='7.66';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is Mark, when React is less than 0.148?"
},
{
"role": "assistant",
"content": "SELECT \"mark\" FROM \"final\" WHERE \"react\"<0.148;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is the sum of Land, when React is greater than 0.217, and when Name is Yoel Hern\u00e1ndez?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"final\" WHERE \"react\">0.217 AND \"name\"='yoel hern\u00e1ndez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is Mark, when Lane is less than 5, and when React is 0.217?"
},
{
"role": "assistant",
"content": "SELECT \"mark\" FROM \"final\" WHERE \"lane\"<5 AND \"react\"=0.217;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the record following game 67?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"game\"=67;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What day in February had an opponent of @ Colorado Rockies?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"february\") FROM \"schedule_and_results\" WHERE \"opponent\"='@ colorado rockies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game with a record of 18-22-13?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"record\"='18-22-13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runners_up_17\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Opponent in the final has a Score of 6\u20133, 3\u20136, 6\u20138?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"runners_up_17\" WHERE \"score\"='6\u20133, 3\u20136, 6\u20138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runners_up_17\" (\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Tournament has a Surface of carpet, and a Date smaller than 1995, and an Opponent in the final of ken flach robert seguso?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"runners_up_17\" WHERE \"surface\"='carpet' AND \"date\"<1995 AND \"opponent_in_the_final\"='ken flach robert seguso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commanders_in_chief_commanders\" (\n \"name\" text,\n \"branch\" text,\n \"term_began\" text,\n \"term_ended\" text,\n \"time_in_office\" text\n);\n\nQuestion: What time in office does the U.S. Navy have?"
},
{
"role": "assistant",
"content": "SELECT \"time_in_office\" FROM \"commanders_in_chief_commanders\" WHERE \"branch\"='u.s. navy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commanders_in_chief_commanders\" (\n \"name\" text,\n \"branch\" text,\n \"term_began\" text,\n \"term_ended\" text,\n \"time_in_office\" text\n);\n\nQuestion: When did the term end for the U.S. Marine Corps?"
},
{
"role": "assistant",
"content": "SELECT \"term_ended\" FROM \"commanders_in_chief_commanders\" WHERE \"branch\"='u.s. marine corps';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_energy_intensity_progression_by_ye\" (\n \"country\" text,\n \"unit_p_koe_05\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real\n);\n\nQuestion: What is the 2006 figure for Argentina when 2007 is less than 0,15?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2006\") FROM \"world_energy_intensity_progression_by_ye\" WHERE \"country\"='argentina' AND \"2007\"<'0,15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_energy_intensity_progression_by_ye\" (\n \"country\" text,\n \"unit_p_koe_05\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real\n);\n\nQuestion: What is the 2009 average if 2008 is less than 0,11 and 2007 is less than 0,08?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2009\") FROM \"world_energy_intensity_progression_by_ye\" WHERE \"2008\"<'0,11' AND \"2007\"<'0,08';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_energy_intensity_progression_by_ye\" (\n \"country\" text,\n \"unit_p_koe_05\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real\n);\n\nQuestion: What is the 2009 average when the 2007 average is more than 0,18?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2009\") FROM \"world_energy_intensity_progression_by_ye\" WHERE \"2007\">'0,18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: How many gains were there for the player who had a loss greater than 57 and a long less than 55?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gain\") FROM \"rushing\" WHERE \"loss\">57 AND \"long\"<55;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest Loss for the player named total that has a long greater than 55?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"loss\") FROM \"rushing\" WHERE \"name\"='total' AND \"long\">55;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What nationality is Kentucky and the player Tayshaun Prince?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"p\" WHERE \"school_club_team\"='kentucky' AND \"player\"='tayshaun prince';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of Duke?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"p\" WHERE \"school_club_team\"='duke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What was the nationality of a point guard position in 1999-2001?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"p\" WHERE \"position\"='point guard' AND \"years_for_grizzlies\"='1999-2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the position of Tayshaun Prince?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"p\" WHERE \"player\"='tayshaun prince';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_princesses_royal\" (\n \"order\" real,\n \"name_dates\" text,\n \"princess_royal_from_date_to_date\" text,\n \"parent\" text,\n \"date_married\" text,\n \"husband_dates\" text\n);\n\nQuestion: Who was the parent on the order of 6?"
},
{
"role": "assistant",
"content": "SELECT \"parent\" FROM \"list_of_princesses_royal\" WHERE \"order\"=6;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.