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 \"elections_to_the_legislative_assembly_of\" (\n \"party\" text,\n \"1985\" real,\n \"1987\" real,\n \"1990\" real,\n \"1995\" real,\n \"1999\" real,\n \"2003\" real,\n \"2007\" real,\n \"2011\" real\n);\n\nQuestion: What is the highest 2003 value with a 1990 greater than 74, a 125 value in 1985, and a 1995 value greater than 130?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"2003\") FROM \"elections_to_the_legislative_assembly_of\" WHERE \"1990\">74 AND \"1985\"=125 AND \"1995\">130;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elections_to_the_legislative_assembly_of\" (\n \"party\" text,\n \"1985\" real,\n \"1987\" real,\n \"1990\" real,\n \"1995\" real,\n \"1999\" real,\n \"2003\" real,\n \"2007\" real,\n \"2011\" real\n);\n\nQuestion: What is the highest 2007 value with a 1985 value greater than 52, a 1987 value greater than 130, and a 1990 less than 1990?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"2007\") FROM \"elections_to_the_legislative_assembly_of\" WHERE \"1985\">52 AND \"1987\">130 AND \"1990\"<1990;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elections_to_the_legislative_assembly_of\" (\n \"party\" text,\n \"1985\" real,\n \"1987\" real,\n \"1990\" real,\n \"1995\" real,\n \"1999\" real,\n \"2003\" real,\n \"2007\" real,\n \"2011\" real\n);\n\nQuestion: What is the highest 1995 with a 1990 less than 36, a 1987 less than 1987, and a 2007 value greater than 107?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1995\") FROM \"elections_to_the_legislative_assembly_of\" WHERE \"1990\">36 AND \"1987\"<1987 AND \"2007\">107;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elections_to_the_legislative_assembly_of\" (\n \"party\" text,\n \"1985\" real,\n \"1987\" real,\n \"1990\" real,\n \"1995\" real,\n \"1999\" real,\n \"2003\" real,\n \"2007\" real,\n \"2011\" real\n);\n\nQuestion: What is the highest 2003 value with a 2011 less than 107 and a 1995 value less than 17?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"2003\") FROM \"elections_to_the_legislative_assembly_of\" WHERE \"2011\"<107 AND \"1995\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the name of the tournament with 11 or more events a top-5 of 0 and a top-25 of 2?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"summary\" WHERE \"events\">11 AND \"top_5\"=0 AND \"top_25\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the most top-10 of the team with 8 cuts made and less than 11 events?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_10\") FROM \"summary\" WHERE \"cuts_made\"=8 AND \"events\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"american_labor_ticket\" text,\n \"liberal_ticket\" text,\n \"communist_ticket\" text\n);\n\nQuestion: What is the American Labor ticket when Henry Epstein is the liberal ticket?"
},
{
"role": "assistant",
"content": "SELECT \"american_labor_ticket\" FROM \"1946_state_election_results\" WHERE \"liberal_ticket\"='henry epstein';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"american_labor_ticket\" text,\n \"liberal_ticket\" text,\n \"communist_ticket\" text\n);\n\nQuestion: What is the name on the Communist ticket with an Office of judge of the court of appeals?"
},
{
"role": "assistant",
"content": "SELECT \"communist_ticket\" FROM \"1946_state_election_results\" WHERE \"office\"='judge of the court of appeals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"american_labor_ticket\" text,\n \"liberal_ticket\" text,\n \"communist_ticket\" text\n);\n\nQuestion: What is the Office when spencer c. young is on the liberal ticket??"
},
{
"role": "assistant",
"content": "SELECT \"office\" FROM \"1946_state_election_results\" WHERE \"liberal_ticket\"='spencer c. young';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"american_labor_ticket\" text,\n \"liberal_ticket\" text,\n \"communist_ticket\" text\n);\n\nQuestion: What is the name on the Democratic ticket when the Liberal ticket is erastus corning 2nd?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_ticket\" FROM \"1946_state_election_results\" WHERE \"liberal_ticket\"='erastus corning 2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"american_labor_ticket\" text,\n \"liberal_ticket\" text,\n \"communist_ticket\" text\n);\n\nQuestion: What name is on the Republican ticket when the American Labor ticket was spencer c. young?"
},
{
"role": "assistant",
"content": "SELECT \"republican_ticket\" FROM \"1946_state_election_results\" WHERE \"american_labor_ticket\"='spencer c. young';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: What is the entered number for the person with a time of 29:28?"
},
{
"role": "assistant",
"content": "SELECT \"entered\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"time\"='29:28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: What is the number eliminated for the person with a time of 12:38?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated_by\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"time\"='12:38';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest Attendance with a Result that is w 24-21?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"result\"='w 24-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"sport\" text,\n \"record\" text,\n \"nation_athlete_s\" text,\n \"date\" text,\n \"time_seconds\" real\n);\n\nQuestion: What Date has a time of (seconds) 42.172?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"track_records\" WHERE \"time_seconds\"=42.172;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_records\" (\n \"sport\" text,\n \"record\" text,\n \"nation_athlete_s\" text,\n \"date\" text,\n \"time_seconds\" real\n);\n\nQuestion: What is the Record for 23 january 2010, with a time smaller than 42.679 seconds?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"track_records\" WHERE \"date\"='23 january 2010' AND \"time_seconds\"<42.679;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"year\" text,\n \"gp_gs\" text,\n \"shots\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of Points that were in a Year that was 2005?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"college_career\" WHERE \"year\"='2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"year\" text,\n \"gp_gs\" text,\n \"shots\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest Shots with a Point that is larger than 32?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"shots\") FROM \"college_career\" WHERE \"points\">32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"category\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Which category had a year of 1991?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"singles\" WHERE \"year\"=1991;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"category\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What is the score having a runner-up of Magdalena Maleeva?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles\" WHERE \"runner_up\"='magdalena maleeva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"present\" (\n \"venue\" text,\n \"location\" text,\n \"capacity\" text,\n \"owner\" text,\n \"environment\" text,\n \"year_built\" text\n);\n\nQuestion: What year was John m. Belk Arena built?"
},
{
"role": "assistant",
"content": "SELECT \"year_built\" FROM \"present\" WHERE \"venue\"='john m. belk arena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"present\" (\n \"venue\" text,\n \"location\" text,\n \"capacity\" text,\n \"owner\" text,\n \"environment\" text,\n \"year_built\" text\n);\n\nQuestion: What type of environment is the venue that was built in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"environment\" FROM \"present\" WHERE \"year_built\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"present\" (\n \"venue\" text,\n \"location\" text,\n \"capacity\" text,\n \"owner\" text,\n \"environment\" text,\n \"year_built\" text\n);\n\nQuestion: What year was transamerica field built in?"
},
{
"role": "assistant",
"content": "SELECT \"year_built\" FROM \"present\" WHERE \"venue\"='transamerica field';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"present\" (\n \"venue\" text,\n \"location\" text,\n \"capacity\" text,\n \"owner\" text,\n \"environment\" text,\n \"year_built\" text\n);\n\nQuestion: What is the location of the venue owned by johnson c. smith university?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"present\" WHERE \"owner\"='johnson c. smith university';"
}
] |
[
{
"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 is the venue when the score was 8-2?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"score\"='8-2';"
}
] |
[
{
"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 is the Score for the 1999 fifa confederations cup?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='1999 fifa confederations cup';"
}
] |
[
{
"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 is the result on 30 june 1995?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='30 june 1995';"
}
] |
[
{
"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 is the Date of the 1999 fifa confederations cup?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='1999 fifa confederations cup';"
}
] |
[
{
"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 is the Venue for the 2002 fifa world cup qualifier, and a Result of 8-2?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='2002 fifa world cup qualifier' AND \"result\"='8-2';"
}
] |
[
{
"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 is the Score on 11 march 2001?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='11 march 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: What is the round 4 that has from less than 1990, and double for round 3?"
},
{
"role": "assistant",
"content": "SELECT \"round_4\" FROM \"scoring_format\" WHERE \"from\"<1990 AND \"round_3\"='double';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: What is the round 6+ that has single as round 2, double as round 4, from 1982?"
},
{
"role": "assistant",
"content": "SELECT \"round_6\" FROM \"scoring_format\" WHERE \"round_2\"='single' AND \"round_4\"='double' AND \"from\"=1982;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: Which round 1 has a from prior to 1984, double as round 3, with a goal lwss than 300?"
},
{
"role": "assistant",
"content": "SELECT \"round_1\" FROM \"scoring_format\" WHERE \"from\"<1984 AND \"round_3\"='double' AND \"goal\"<300;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_format\" (\n \"from\" real,\n \"goal\" real,\n \"round_1\" text,\n \"round_2\" text,\n \"round_3\" text,\n \"round_4\" text,\n \"round_5\" text,\n \"round_6\" text\n);\n\nQuestion: What is the round 6+ that has a from prior to 1993, double for round 3, and a double for round 5?"
},
{
"role": "assistant",
"content": "SELECT \"round_6\" FROM \"scoring_format\" WHERE \"from\"<1993 AND \"round_3\"='double' AND \"round_5\"='double';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atomic_radii\" (\n \"number\" real,\n \"symbol\" text,\n \"name\" text,\n \"empirical\" text,\n \"calculated\" text,\n \"van_der_waals\" text,\n \"covalent_single_bond\" text,\n \"covalent_triple_bond\" text\n);\n\nQuestion: What is the symbol of the element with an empirical t of 190 and a calculated value of 135?"
},
{
"role": "assistant",
"content": "SELECT \"symbol\" FROM \"atomic_radii\" WHERE \"empirical\"='190' AND \"calculated\"='135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atomic_radii\" (\n \"number\" real,\n \"symbol\" text,\n \"name\" text,\n \"empirical\" text,\n \"calculated\" text,\n \"van_der_waals\" text,\n \"covalent_single_bond\" text,\n \"covalent_triple_bond\" text\n);\n\nQuestion: What is the name of the element with a calculated value of 56?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atomic_radii\" WHERE \"calculated\"='56';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atomic_radii\" (\n \"number\" real,\n \"symbol\" text,\n \"name\" text,\n \"empirical\" text,\n \"calculated\" text,\n \"van_der_waals\" text,\n \"covalent_single_bond\" text,\n \"covalent_triple_bond\" text\n);\n\nQuestion: What is the covalent (single bond) value of sodium?"
},
{
"role": "assistant",
"content": "SELECT \"covalent_single_bond\" FROM \"atomic_radii\" WHERE \"name\"='sodium';"
}
] |
[
{
"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 \"2008_2009_team\" text\n);\n\nQuestion: What is the lowest jersey # of the player with a height of 191 cm from the New Jersey Devils in 2008-2009?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"jersey_num\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"height_cm\"=191 AND \"2008_2009_team\"='new jersey devils';"
}
] |
[
{
"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 \"2008_2009_team\" text\n);\n\nQuestion: What is the total height of the player with a birthdate on September 2, 1973?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"height_cm\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"birthdate\"='september 2, 1973';"
}
] |
[
{
"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 \"2008_2009_team\" text\n);\n\nQuestion: What is the birthdate of Robert Esche?"
},
{
"role": "assistant",
"content": "SELECT \"birthdate\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"name\"='robert esche';"
}
] |
[
{
"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 \"2008_2009_team\" text\n);\n\nQuestion: What is the position of the player with a jersey # greater than 30 and a December 23, 1986 birthdate?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"jersey_num\">30 AND \"birthdate\"='december 23, 1986';"
}
] |
[
{
"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 \"2008_2009_team\" text\n);\n\nQuestion: What is the weight of John-Michael Liles?"
},
{
"role": "assistant",
"content": "SELECT \"weight_kg\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"name\"='john-michael liles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liverpool\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: What was the first leg score during the quarter-final game?"
},
{
"role": "assistant",
"content": "SELECT \"first_leg\" FROM \"liverpool\" WHERE \"round\"='quarter-final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liverpool\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: What was the aggregate score for the game against Dynamo Dresden?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate_score\" FROM \"liverpool\" WHERE \"opposition\"='dynamo dresden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liverpool\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: Who was the opposing team in the 3rd round?"
},
{
"role": "assistant",
"content": "SELECT \"opposition\" FROM \"liverpool\" WHERE \"round\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which nation has 0 golds and more than 1 silver?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\"=0 AND \"silver\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest total that has under 3 golds, more than 0 silvers and bronzes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"gold\"<3 AND \"bronze\">0 AND \"silver\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of silvers associated with 3 bronzes, a total over 6, and a rank of 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"bronze\"=3 AND \"rank\"='3' AND \"total\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of bronzes associated with 0 golds and a rank of 10?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='10' AND \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest silver value associated with 0 golds?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of bronzes from the Netherlands?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='netherlands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"wins\" real,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"average\" real\n);\n\nQuestion: What is the average amount of earnings for years under 2004 and money list rankings of 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"earnings\") FROM \"lpga_tour_career_summary\" WHERE \"money_list_rank\"='6' AND \"year\"<2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"wins\" real,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"average\" real\n);\n\nQuestion: What is the highest number of wins for years after 1999 with averages over 73.02?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"lpga_tour_career_summary\" WHERE \"average\">73.02 AND \"year\">1999;"
}
] |
[
{
"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 \"attendance\" text\n);\n\nQuestion: Who was the away team when the home team Manchester United played?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"home_team\"='manchester 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 \"attendance\" text\n);\n\nQuestion: When there was a tie of 16 what was the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='16';"
}
] |
[
{
"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 \"attendance\" text\n);\n\nQuestion: Tell me the score when there was a Tie number of 6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='6';"
}
] |
[
{
"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 \"attendance\" text\n);\n\nQuestion: For the Tie number of 14 who was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What Catalog released on June 29, 1999 has a Digipak Album Format?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='digipak album' AND \"date\"='june 29, 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the release Date of Catalog RR 8655-2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='rr 8655-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_7_1_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Group Song is \u5c31\u662f\u4f60, and when Index is F2?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"episode_7_1_march_2008\" WHERE \"group_song\"='\u5c31\u662f\u4f60' AND \"index\"='f2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_7_1_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Name is Nicole \u8d56\u6dde\u51e4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"episode_7_1_march_2008\" WHERE \"name\"='nicole \u8d56\u6dde\u51e4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_7_1_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is Score, when Song is \u7b2c\u4e5d\u591c?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"episode_7_1_march_2008\" WHERE \"song\"='\u7b2c\u4e5d\u591c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_7_1_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is Group Song, when Song is \u6362\u5b63?"
},
{
"role": "assistant",
"content": "SELECT \"group_song\" FROM \"episode_7_1_march_2008\" WHERE \"song\"='\u6362\u5b63';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_7_1_march_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is Group Song, when Name is Alice \u6797\u82af\u7cf8?"
},
{
"role": "assistant",
"content": "SELECT \"group_song\" FROM \"episode_7_1_march_2008\" WHERE \"name\"='alice \u6797\u82af\u7cf8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runner_up_16\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what surface was the match played with a score of 2\u20136, 6\u20133, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"runner_up_16\" WHERE \"score\"='2\u20136, 6\u20133, 6\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runner_up_16\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what surface was the match played with a score of 4\u20136, 6\u20133, 6\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"runner_up_16\" WHERE \"score\"='4\u20136, 6\u20133, 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runner_up_16\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score when the opponent in the final was iroda tulyaganova?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"runner_up_16\" WHERE \"opponent_in_the_final\"='iroda tulyaganova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runner_up_16\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament has an opponent in the final of nadia petrova and a score of 6\u20133, 4\u20136, 6\u20131??"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"runner_up_16\" WHERE \"opponent_in_the_final\"='nadia petrova' AND \"score\"='6\u20133, 4\u20136, 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"education\" (\n \"school_year\" text,\n \"95_96\" text,\n \"99_00\" text,\n \"00_01\" text,\n \"01_02\" text,\n \"02_03\" text,\n \"03_04\" text,\n \"04_05\" text,\n \"05_06\" text,\n \"06_07\" text\n);\n\nQuestion: What is 01-02, when 03-04 is 03-04?"
},
{
"role": "assistant",
"content": "SELECT \"01_02\" FROM \"education\" WHERE \"03_04\"='03-04';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"education\" (\n \"school_year\" text,\n \"95_96\" text,\n \"99_00\" text,\n \"00_01\" text,\n \"01_02\" text,\n \"02_03\" text,\n \"03_04\" text,\n \"04_05\" text,\n \"05_06\" text,\n \"06_07\" text\n);\n\nQuestion: What is 02-03, when School Year is % Learning In Latvian?"
},
{
"role": "assistant",
"content": "SELECT \"02_03\" FROM \"education\" WHERE \"school_year\"='% learning in latvian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"education\" (\n \"school_year\" text,\n \"95_96\" text,\n \"99_00\" text,\n \"00_01\" text,\n \"01_02\" text,\n \"02_03\" text,\n \"03_04\" text,\n \"04_05\" text,\n \"05_06\" text,\n \"06_07\" text\n);\n\nQuestion: What is 03-04, when 00-01 is 67.4?"
},
{
"role": "assistant",
"content": "SELECT \"03_04\" FROM \"education\" WHERE \"00_01\"='67.4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"education\" (\n \"school_year\" text,\n \"95_96\" text,\n \"99_00\" text,\n \"00_01\" text,\n \"01_02\" text,\n \"02_03\" text,\n \"03_04\" text,\n \"04_05\" text,\n \"05_06\" text,\n \"06_07\" text\n);\n\nQuestion: What is 02-03, when 06-07 is 1198?"
},
{
"role": "assistant",
"content": "SELECT \"02_03\" FROM \"education\" WHERE \"06_07\"='1198';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"education\" (\n \"school_year\" text,\n \"95_96\" text,\n \"99_00\" text,\n \"00_01\" text,\n \"01_02\" text,\n \"02_03\" text,\n \"03_04\" text,\n \"04_05\" text,\n \"05_06\" text,\n \"06_07\" text\n);\n\nQuestion: What is 04-05, when 05-06 is 205,189?"
},
{
"role": "assistant",
"content": "SELECT \"04_05\" FROM \"education\" WHERE \"05_06\"='205,189';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"education\" (\n \"school_year\" text,\n \"95_96\" text,\n \"99_00\" text,\n \"00_01\" text,\n \"01_02\" text,\n \"02_03\" text,\n \"03_04\" text,\n \"04_05\" text,\n \"05_06\" text,\n \"06_07\" text\n);\n\nQuestion: What is 03-04, when 95-96 is 337,660?"
},
{
"role": "assistant",
"content": "SELECT \"03_04\" FROM \"education\" WHERE \"95_96\"='337,660';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_8_july_30_2008\" (\n \"couple\" text,\n \"style\" text,\n \"music\" text,\n \"choreographer_s\" text,\n \"results\" text\n);\n\nQuestion: Who was the choreographer for the dance style of Jazz?"
},
{
"role": "assistant",
"content": "SELECT \"choreographer_s\" FROM \"week_8_july_30_2008\" WHERE \"style\"='jazz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_8_july_30_2008\" (\n \"couple\" text,\n \"style\" text,\n \"music\" text,\n \"choreographer_s\" text,\n \"results\" text\n);\n\nQuestion: Which music led to a safe result and was choreographed by Jason Gilkison?"
},
{
"role": "assistant",
"content": "SELECT \"music\" FROM \"week_8_july_30_2008\" WHERE \"results\"='safe' AND \"choreographer_s\"='jason gilkison';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_8_july_30_2008\" (\n \"couple\" text,\n \"style\" text,\n \"music\" text,\n \"choreographer_s\" text,\n \"results\" text\n);\n\nQuestion: Which couple participated in the Contemporary style of dance?"
},
{
"role": "assistant",
"content": "SELECT \"couple\" FROM \"week_8_july_30_2008\" WHERE \"style\"='contemporary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_8_july_30_2008\" (\n \"couple\" text,\n \"style\" text,\n \"music\" text,\n \"choreographer_s\" text,\n \"results\" text\n);\n\nQuestion: Which couple participated in the Paso Doble style and were safe?"
},
{
"role": "assistant",
"content": "SELECT \"couple\" FROM \"week_8_july_30_2008\" WHERE \"results\"='safe' AND \"style\"='paso doble';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the Date of the game held during Week 1, that had an Attendance greater than 50,637?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\">'50,637' AND \"week\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many weeks had a game on November 26, 1978, and an attendance higher than 26,248?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='november 26, 1978' AND \"attendance\">'26,248';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the lowest Attendance during Week 12?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the name of the tournament that the final was played against Yi Jingqian?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_wins_6\" WHERE \"opponent_in_the_final\"='yi jingqian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was the final opponent in the tournament in Taipei, Taiwan on November 14, 1994?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_wins_6\" WHERE \"tournament\"='taipei, taiwan' AND \"date\"='november 14, 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On October 14, 1996 who was the opponent in the final?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_wins_6\" WHERE \"date\"='october 14, 1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: When playing against Yi Jingqian in the final on a hard surface what was the score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_wins_6\" WHERE \"surface\"='hard' AND \"opponent_in_the_final\"='yi jingqian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was played against in the final on November 14, 1994?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_wins_6\" WHERE \"date\"='november 14, 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: What is the total number of Entered when the eliminated number is 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"entered\") FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"eliminated\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" text,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: What is the Eliminated when there are less than 4 entered and the wrestler was shawn michaels?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"entered\"<4 AND \"wrestler\"='shawn michaels';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"services\" (\n \"platform\" real,\n \"frequency_per_hour\" real,\n \"destination\" text,\n \"service_pattern\" text,\n \"operator\" text,\n \"line\" text\n);\n\nQuestion: How many frequencies have a line of East London and destination of Crystal Palace?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"frequency_per_hour\") FROM \"services\" WHERE \"line\"='east london' AND \"destination\"='crystal palace';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"services\" (\n \"platform\" real,\n \"frequency_per_hour\" real,\n \"destination\" text,\n \"service_pattern\" text,\n \"operator\" text,\n \"line\" text\n);\n\nQuestion: Which line has an operator of the London Overground and ends at the Crystal Palace?"
},
{
"role": "assistant",
"content": "SELECT \"line\" FROM \"services\" WHERE \"operator\"='london overground' AND \"destination\"='crystal palace';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: How many weeks on top was the song with a volume:issue of 28:26?"
},
{
"role": "assistant",
"content": "SELECT \"weeks_on_top\" FROM \"see_also\" WHERE \"volume_issue\"='28:26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: Which song was 1 week on top and had a volume:issue of 29:8?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"see_also\" WHERE \"weeks_on_top\"='1' AND \"volume_issue\"='29:8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: Which song was by artist Gino Vannelli?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"see_also\" WHERE \"artist\"='gino vannelli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What tournament did Bill Rogers play in when he had less than 7 Cuts, 0 Wins, and less than 1 Top-25?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"summary\" WHERE \"cuts_made\"<7 AND \"wins\"=0 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 \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is 9:00, when 8:30 is \"My Thursday Night Movie\"?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"thursday\" WHERE \"8_30\"='my thursday night movie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is 9:30, when 8:30 is \"Bones (Reruns)\"?"
},
{
"role": "assistant",
"content": "SELECT \"9_30\" FROM \"thursday\" WHERE \"8_30\"='bones (reruns)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is 8:30, when 9:00 is \"The Office (Reruns)\", and when 10:00 is \"Law & Order (Reruns)\"?"
},
{
"role": "assistant",
"content": "SELECT \"8_30\" FROM \"thursday\" WHERE \"9_00\"='the office (reruns)' AND \"10_00\"='law & order (reruns)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is 10:00, when 9:30 is \"Grey's Anatomy (Reruns)\", and when 8:00 is \"Samantha Who?\"?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"thursday\" WHERE \"9_30\"='grey''s anatomy (reruns)' AND \"8_00\"='samantha who?';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"advocates\" (\n \"advocate\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"poll_wins\" real,\n \"poll_losses\" real\n);\n\nQuestion: What are the number of losses that have Ties of 1 and 3 or more poll wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"advocates\" WHERE \"ties\"=1 AND \"poll_wins\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"advocates\" (\n \"advocate\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"poll_wins\" real,\n \"poll_losses\" real\n);\n\nQuestion: What is the lowest poll losses of the 0 ties, poll wins greater than 1 and wins less than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"poll_losses\") FROM \"advocates\" WHERE \"ties\"=0 AND \"poll_wins\">1 AND \"wins\"<2;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.