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 \"conto_tv_teleitalia\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: Which television service has programmi per adulti 24h/24 content and no HDTV?"
},
{
"role": "assistant",
"content": "SELECT \"television_service\" FROM \"conto_tv_teleitalia\" WHERE \"content\"='programmi per adulti 24h/24' AND \"hdtv\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conto_tv_teleitalia\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: Which television service has a qualsiasi package/option?"
},
{
"role": "assistant",
"content": "SELECT \"television_service\" FROM \"conto_tv_teleitalia\" WHERE \"package_option\"='qualsiasi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of wins for Darley of Ballarat FL against larger than 1055?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"2009_ladder\" WHERE \"ballarat_fl\"='darley' AND \"against\">1055;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest draw that has less than 4 wins, 14 losses, and against more than 1836?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"2009_ladder\" WHERE \"wins\"<4 AND \"losses\"=14 AND \"against\">1836;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average Byes that has Ballarat FL of Sunbury against more than 1167?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"byes\") FROM \"2009_ladder\" WHERE \"ballarat_fl\"='sunbury' AND \"against\">1167;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average draws with more than 1 win, 14 losses, and against less than 1836?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draws\") FROM \"2009_ladder\" WHERE \"wins\">1 AND \"losses\"=14 AND \"against\"<1836;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What was the lowest draw from Ballarat FL of sunbury, and byes larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"2009_ladder\" WHERE \"ballarat_fl\"='sunbury' AND \"byes\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"party\" text,\n \"medium_gallup_march_2008\" real,\n \"strategic_marketing_march_2008\" real,\n \"ce_sid_may_2008\" real,\n \"medium_gallup_may_2008\" real\n);\n\nQuestion: What is the highest medium Gallup March 2008 value for a Strategic Marking value under 17 and Medium Gallup May 2008 value over 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"medium_gallup_march_2008\") FROM \"opinion_polls\" WHERE \"strategic_marketing_march_2008\"<17 AND \"medium_gallup_may_2008\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"party\" text,\n \"medium_gallup_march_2008\" real,\n \"strategic_marketing_march_2008\" real,\n \"ce_sid_may_2008\" real,\n \"medium_gallup_may_2008\" real\n);\n\nQuestion: What is the sum of Medium Gallup, March 2008 values where the Medium Gallup, May 2008 values are under 10?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"medium_gallup_march_2008\") FROM \"opinion_polls\" WHERE \"medium_gallup_may_2008\"<10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What show is on at 9:30 when Dating in the Dark is on at 10:00?"
},
{
"role": "assistant",
"content": "SELECT \"9_30\" FROM \"monday\" WHERE \"10_00\"='dating in the dark';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What show is on at 9:00 when Law & Order: Criminal Intent is on at 9:30 and The Great American Road Trip is on at 8:00?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"monday\" WHERE \"9_30\"='law & order: criminal intent' AND \"8_00\"='the great american road trip';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What show is on at 9:00 when The Bachelorette is on at 8:30?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"monday\" WHERE \"8_30\"='the bachelorette';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which away has apoel as the club?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"european_record\" WHERE \"club\"='apoel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text\n);\n\nQuestion: Which away has uefa cup as the competition, group f as the round, with espanyol as the club?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"european_record\" WHERE \"competition\"='uefa cup' AND \"round\"='group f' AND \"club\"='espanyol';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: In what location were the fatalities unknown for the Ju-52 aircraft?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"accidents_and_incidents\" WHERE \"fatalities\"='unknown' AND \"aircraft\"='ju-52';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: In what location was the tail number ZS-SPF?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"accidents_and_incidents\" WHERE \"tail_number\"='zs-spf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What was the location of the Ju-52 aircraft?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"accidents_and_incidents\" WHERE \"aircraft\"='ju-52';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: How many fatalities occurred for an unknown tail number?"
},
{
"role": "assistant",
"content": "SELECT \"fatalities\" FROM \"accidents_and_incidents\" WHERE \"tail_number\"='unknown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What was the tail number with 3/3 fatalities?"
},
{
"role": "assistant",
"content": "SELECT \"tail_number\" FROM \"accidents_and_incidents\" WHERE \"fatalities\"='3/3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: How many fatalities occurred for the Ju-52 aircraft?"
},
{
"role": "assistant",
"content": "SELECT \"fatalities\" FROM \"accidents_and_incidents\" WHERE \"aircraft\"='ju-52';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score for a goal of 6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"goal\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Where was the match held on July 17, 1999?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='july 17, 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1910_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"socialist_ticket\" text,\n \"independence_league_ticket\" text,\n \"prohibition_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who was on the Democratic ticket for the Office of Attorney General?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_ticket\" FROM \"1910_state_election_results\" WHERE \"office\"='attorney general';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"angiosperms\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What name has gen et sp nov as the novelty?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"angiosperms\" WHERE \"novelty\"='gen et sp nov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"angiosperms\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What authors have clarno formation as the unit, actinidia oregonensis as the name?"
},
{
"role": "assistant",
"content": "SELECT \"authors\" FROM \"angiosperms\" WHERE \"unit\"='clarno formation' AND \"name\"='actinidia oregonensis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"angiosperms\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What novelty has USA as the location, and coryloides as the name?"
},
{
"role": "assistant",
"content": "SELECT \"novelty\" FROM \"angiosperms\" WHERE \"location\"='usa' AND \"name\"='coryloides';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"angiosperms\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What status has paleopanax as the name?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"angiosperms\" WHERE \"name\"='paleopanax';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"angiosperms\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What unit has gen et sp nov as the novelty?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"angiosperms\" WHERE \"novelty\"='gen et sp nov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_20\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which date was the Memorial Tournament held on, when Payne Stewart was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_20\" WHERE \"tournament\"='memorial tournament' AND \"runner_s_up\"='payne stewart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What grand slam event has a 2011-12 of q?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"grand_slam_record\" WHERE \"2011_12\"='q';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What is the 2009-10 result that has a 2006-07 result of n/a?"
},
{
"role": "assistant",
"content": "SELECT \"2009_10\" FROM \"grand_slam_record\" WHERE \"2006_07\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What is the 2007-08 result when the event was Colonial Square?"
},
{
"role": "assistant",
"content": "SELECT \"2007_08\" FROM \"grand_slam_record\" WHERE \"event\"='colonial square';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What is the result in 2008-09 that has a 2011-12 result of qf?"
},
{
"role": "assistant",
"content": "SELECT \"2008_09\" FROM \"grand_slam_record\" WHERE \"2011_12\"='qf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What result in 2006-07 has a result in 2010-11 of n/a, and the event is Colonial Square?"
},
{
"role": "assistant",
"content": "SELECT \"2006_07\" FROM \"grand_slam_record\" WHERE \"2010_11\"='n/a' AND \"event\"='colonial square';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: What is the 2008-09 result has Masters as the event?"
},
{
"role": "assistant",
"content": "SELECT \"2008_09\" FROM \"grand_slam_record\" WHERE \"event\"='masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"series\" text,\n \"result\" text\n);\n\nQuestion: What year gave a nominated result for the room 222 series?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"women\" WHERE \"result\"='nominated' AND \"series\"='room 222';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"series\" text,\n \"result\" text\n);\n\nQuestion: What was actor Teresa Graves's series before the year 1993?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"women\" WHERE \"year\"<1993 AND \"actor\"='teresa graves';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trams\" (\n \"class\" text,\n \"quantity\" real,\n \"manufacturer\" text,\n \"motor\" text,\n \"seats\" real\n);\n\nQuestion: Which motor's quantity was more than 8, and a class of bs 1915?"
},
{
"role": "assistant",
"content": "SELECT \"motor\" FROM \"trams\" WHERE \"quantity\">8 AND \"class\"='bs 1915';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trams\" (\n \"class\" text,\n \"quantity\" real,\n \"manufacturer\" text,\n \"motor\" text,\n \"seats\" real\n);\n\nQuestion: Which motor's class was bs 1910?"
},
{
"role": "assistant",
"content": "SELECT \"motor\" FROM \"trams\" WHERE \"class\"='bs 1910';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trams\" (\n \"class\" text,\n \"quantity\" real,\n \"manufacturer\" text,\n \"motor\" text,\n \"seats\" real\n);\n\nQuestion: What is the quantity when the seats number was 16 and the class was kss 1913?"
},
{
"role": "assistant",
"content": "SELECT \"quantity\" FROM \"trams\" WHERE \"seats\"=16 AND \"class\"='kss 1913';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2008\" (\n \"advocate_num_1\" text,\n \"advocate_num_2\" text,\n \"root_of_all_evil\" text,\n \"poll_winner\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the Root of All Evil with an Original air date that is september 3, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"root_of_all_evil\" FROM \"season_2_2008\" WHERE \"original_air_date\"='september 3, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"place_posici_n\" real,\n \"team_equipo\" text,\n \"played_pj\" real,\n \"won_pg\" real,\n \"draw_pe\" real,\n \"lost_pp\" real,\n \"goals_scored_gf\" real,\n \"goals_conceded_gc\" real,\n \"dif\" real,\n \"points_pts\" real\n);\n\nQuestion: Goals Conceded (GC) that has a Draw (PE) larger than 2, and a Goals Scored (GF) larger than 19?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_conceded_gc\") FROM \"group_b\" WHERE \"draw_pe\">2 AND \"goals_scored_gf\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_6th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the number for the University of Dublin with their Cultural and Educational Panel of 5, and an Industrial and Commercial Panel with less than 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"university_of_dublin\") FROM \"composition_of_the_6th_seanad\" WHERE \"cultural_and_educational_panel\"=5 AND \"industrial_and_commercial_panel\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_countries\" (\n \"rank\" real,\n \"country\" text,\n \"winner\" real,\n \"runner_up\" real,\n \"losing_semi_finalist\" real\n);\n\nQuestion: Which Rank has a Losing Semi- finalist larger than 1, and a Winner smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"top_countries\" WHERE \"losing_semi_finalist\">1 AND \"winner\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_countries\" (\n \"rank\" real,\n \"country\" text,\n \"winner\" real,\n \"runner_up\" real,\n \"losing_semi_finalist\" real\n);\n\nQuestion: Which Rank has a Country of costa rica, and a Losing Semi- finalist larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"top_countries\" WHERE \"country\"='costa rica' AND \"losing_semi_finalist\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_countries\" (\n \"rank\" real,\n \"country\" text,\n \"winner\" real,\n \"runner_up\" real,\n \"losing_semi_finalist\" real\n);\n\nQuestion: Which Rank has a Runner -up smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"top_countries\" WHERE \"runner_up\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What is the Winner's share in 2007?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"winner_s_share\") FROM \"winners\" WHERE \"year\"='2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What Year was the United States the country for aug 3\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners\" WHERE \"country\"='united states' AND \"dates\"='aug 3\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winner_s_share\" real\n);\n\nQuestion: What is the highest Purse for aug 3\u20135?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"purse\") FROM \"winners\" WHERE \"dates\"='aug 3\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_wrestling\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: Which country has a qualsiasi tranne sky hd package/option?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"football_wrestling\" WHERE \"package_option\"='qualsiasi tranne sky hd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_wrestling\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: Which package/option has sky wwe 24/7 television service?"
},
{
"role": "assistant",
"content": "SELECT \"package_option\" FROM \"football_wrestling\" WHERE \"television_service\"='sky wwe 24/7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_wrestling\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the package/option for the calcio content?"
},
{
"role": "assistant",
"content": "SELECT \"package_option\" FROM \"football_wrestling\" WHERE \"content\"='calcio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_wrestling\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the language of the television service cartello promozionale sky hd?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"football_wrestling\" WHERE \"television_service\"='cartello promozionale sky hd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What kind of bike had a grid less than 23, an accident under time, and Graeme Gowland as a rider?"
},
{
"role": "assistant",
"content": "SELECT \"bike\" FROM \"supersport_race_classification\" WHERE \"grid\"<23 AND \"time\"='accident' AND \"rider\"='graeme gowland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Who was the rider with more than 5 laps on a grid bigger than 29 on a Honda CBR600RR and time at +1:27.385?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"supersport_race_classification\" WHERE \"laps\">5 AND \"grid\">29 AND \"bike\"='honda cbr600rr' AND \"time\"='+1:27.385';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Who was the rider with a grid of 36?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"supersport_race_classification\" WHERE \"grid\"=36;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which bike had a grid less than 35 and time at 37:58.607?"
},
{
"role": "assistant",
"content": "SELECT \"bike\" FROM \"supersport_race_classification\" WHERE \"grid\"<35 AND \"time\"='37:58.607';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Director is Veljko Bulaji\u0107 category:articles with hcards, and when Original title is Sarajevski Atentat?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"yugoslavia\" WHERE \"director\"='veljko bulaji\u0107 category:articles with hcards' AND \"original_title\"='sarajevski atentat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Director is Mirza Idrizovi\u0107 category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"yugoslavia\" WHERE \"director\"='mirza idrizovi\u0107 category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Original title, when Film title used in nomination is Train Without A Timetable?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"yugoslavia\" WHERE \"film_title_used_in_nomination\"='train without a timetable';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Original title, when Director is Veljko Bulaji\u0107 category:articles with hcards, and when Film title used in nomination is Train Without A Timetable?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"yugoslavia\" WHERE \"director\"='veljko bulaji\u0107 category:articles with hcards' AND \"film_title_used_in_nomination\"='train without a timetable';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Film title used in nomination, when Year (Ceremony) is 1968 (41st)?"
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"yugoslavia\" WHERE \"year_ceremony\"='1968 (41st)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Director, when Result is nominee, and when Year (Ceremony) is 1969 (42nd)?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"yugoslavia\" WHERE \"result\"='nominee' AND \"year_ceremony\"='1969 (42nd)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"previous_club_team\" text\n);\n\nQuestion: Which name's height in centimeters is 178 when its weight in kilograms is less than 91?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"height_cm\"=178 AND \"weight_kg\"<91;"
}
] |
[
{
"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 the name of the player with the High points when there was a Record of 31\u201348?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"record\"='31\u201348';"
}
] |
[
{
"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 the name of the player with the High rebounds when there was a Score of l 108\u2013114 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"score\"='l 108\u2013114 (ot)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the Lead for the 1999\u201300 season?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"season\"='1999\u201300';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the Second when the third is don walchuk?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"third\"='don walchuk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the Season when the Lead was don bartlett, and the third was don walchuk, and a Second of carter rycroft?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"teams\" WHERE \"lead\"='don bartlett' AND \"third\"='don walchuk' AND \"second\"='carter rycroft';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the Skip when the Third was john morris?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"third\"='john morris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the Third when the Lead was don bartlett, the Second was carter rycroft, and a Season of 2003\u201304?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"teams\" WHERE \"lead\"='don bartlett' AND \"second\"='carter rycroft' AND \"season\"='2003\u201304';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the Lead when the Second was marc kennedy, in the 2012\u201313 season?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"second\"='marc kennedy' AND \"season\"='2012\u201313';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" text\n);\n\nQuestion: What is the name of the city with a capacity of 41,311?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"clubs_stadiums_and_locations\" WHERE \"capacity\"='41,311';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" text\n);\n\nQuestion: What is the State with Suwon as the city"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"clubs_stadiums_and_locations\" WHERE \"city\"='suwon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" text\n);\n\nQuestion: What is the State with a home venue of suwon sports complex?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"clubs_stadiums_and_locations\" WHERE \"home_venue\"='suwon sports complex';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" text\n);\n\nQuestion: What is the team name for Chungju?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"clubs_stadiums_and_locations\" WHERE \"city\"='chungju';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" text\n);\n\nQuestion: What is the Team with a venue of Anyang Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"clubs_stadiums_and_locations\" WHERE \"home_venue\"='anyang stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs_stadiums_and_locations\" (\n \"team\" text,\n \"city\" text,\n \"state\" text,\n \"home_venue\" text,\n \"capacity\" text\n);\n\nQuestion: What is the State with Gwangju Fc as the team?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"clubs_stadiums_and_locations\" WHERE \"team\"='gwangju fc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To par, when the Player is Loren Roberts?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round_saturday\" WHERE \"player\"='loren roberts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To par, when the Score is 68-71-69=208?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round_saturday\" WHERE \"score\"='68-71-69=208';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place, when the Score is 68-70-71=209?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round_saturday\" WHERE \"score\"='68-70-71=209';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place, when the Player is Chris Dimarco?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round_saturday\" WHERE \"player\"='chris dimarco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Score, when the Country is United States, when the Place is T3, and when the Player is Chris Riley?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round_saturday\" WHERE \"country\"='united states' AND \"place\"='t3' AND \"player\"='chris riley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_10_2_titles_8_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the score where the opponent was Mardy Fish?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_10_2_titles_8_runners_up\" WHERE \"opponent\"='mardy fish';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_champion_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What surface was played on with a score of 6\u20134, 6\u20133 and on 4 May 1992?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_champion_9\" WHERE \"score\"='6\u20134, 6\u20133' AND \"date\"='4 may 1992';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_champion_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the name of the tournament played 13 November 2000?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_champion_9\" WHERE \"date\"='13 november 2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_champion_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament was played on 12 February 2001?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_champion_9\" WHERE \"date\"='12 february 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average round number with wide receiver as position and Clark University as the college and the pick number is bigger than 166?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round_num\") FROM \"nfl_draft\" WHERE \"position\"='wide receiver' AND \"college\"='clark university' AND \"pick_num\">166;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"british_universities_and_colleges_sport\" (\n \"team\" text,\n \"university\" text,\n \"location\" text,\n \"year_entered_league\" real,\n \"2013_14_division\" text\n);\n\nQuestion: Which team had a year entering the league under 2009, located in Bath?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"british_universities_and_colleges_sport\" WHERE \"year_entered_league\"<2009 AND \"location\"='bath';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"british_universities_and_colleges_sport\" (\n \"team\" text,\n \"university\" text,\n \"location\" text,\n \"year_entered_league\" real,\n \"2013_14_division\" text\n);\n\nQuestion: What is the year of entry for the University of Essex?"
},
{
"role": "assistant",
"content": "SELECT \"year_entered_league\" FROM \"british_universities_and_colleges_sport\" WHERE \"university\"='university of essex';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"british_universities_and_colleges_sport\" (\n \"team\" text,\n \"university\" text,\n \"location\" text,\n \"year_entered_league\" real,\n \"2013_14_division\" text\n);\n\nQuestion: What is the 2013-2014 division for the Wolverhampton Wildcats?"
},
{
"role": "assistant",
"content": "SELECT \"2013_14_division\" FROM \"british_universities_and_colleges_sport\" WHERE \"team\"='wolverhampton wildcats';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"british_universities_and_colleges_sport\" (\n \"team\" text,\n \"university\" text,\n \"location\" text,\n \"year_entered_league\" real,\n \"2013_14_division\" text\n);\n\nQuestion: Which university was in the Western division in 2013-14, located in Bath, and named the Bath Spa Bulldogs?"
},
{
"role": "assistant",
"content": "SELECT \"university\" FROM \"british_universities_and_colleges_sport\" WHERE \"2013_14_division\"='western' AND \"location\"='bath' AND \"team\"='bath spa bulldogs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the least amount of draws with an against of 1261?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"2008_ladder\" WHERE \"against\"=1261;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cover_version\" (\n \"album\" text,\n \"release_date\" text,\n \"label\" text,\n \"format\" text,\n \"covered_song\" text,\n \"original_song\" text\n);\n\nQuestion: What label shows an Album of cover version v?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"cover_version\" WHERE \"album\"='cover version v';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cover_version\" (\n \"album\" text,\n \"release_date\" text,\n \"label\" text,\n \"format\" text,\n \"covered_song\" text,\n \"original_song\" text\n);\n\nQuestion: What is the Label for the Covered Song named \" sign o' the times \" by prince .?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"cover_version\" WHERE \"covered_song\"='\\\" sign o'' the times \\\" by prince .';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cover_version\" (\n \"album\" text,\n \"release_date\" text,\n \"label\" text,\n \"format\" text,\n \"covered_song\" text,\n \"original_song\" text\n);\n\nQuestion: What is the Label when the album shows cover version vi?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"cover_version\" WHERE \"album\"='cover version vi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cover_version\" (\n \"album\" text,\n \"release_date\" text,\n \"label\" text,\n \"format\" text,\n \"covered_song\" text,\n \"original_song\" text\n);\n\nQuestion: What is the Release date for the Covered Song named \" sign o' the times \" by prince .?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"cover_version\" WHERE \"covered_song\"='\\\" sign o'' the times \\\" by prince .';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cover_version\" (\n \"album\" text,\n \"release_date\" text,\n \"label\" text,\n \"format\" text,\n \"covered_song\" text,\n \"original_song\" text\n);\n\nQuestion: What shows as the Original Song when the Covered Song was \" sign o' the times \" by prince .?"
},
{
"role": "assistant",
"content": "SELECT \"original_song\" FROM \"cover_version\" WHERE \"covered_song\"='\\\" sign o'' the times \\\" by prince .';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cover_version\" (\n \"album\" text,\n \"release_date\" text,\n \"label\" text,\n \"format\" text,\n \"covered_song\" text,\n \"original_song\" text\n);\n\nQuestion: What is the name of the Covered Song when the Album shows cover version iii?"
},
{
"role": "assistant",
"content": "SELECT \"covered_song\" FROM \"cover_version\" WHERE \"album\"='cover version iii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the sum of Week when there were 67,968 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\"='67,968';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.