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 \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" text,\n \"conference_joined\" text\n);\n\nQuestion: Can you tell me the Conference Joined that has the Location of terre haute, and the Mascot of golden bears?"
},
{
"role": "assistant",
"content": "SELECT \"conference_joined\" FROM \"former_members\" WHERE \"location\"='terre haute' AND \"mascot\"='golden bears';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" text,\n \"conference_joined\" text\n);\n\nQuestion: Can you tell me the Mascot that has the School of rosedale?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"school\"='rosedale';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" text,\n \"conference_joined\" text\n);\n\nQuestion: Can you tell me the Conference Joined that has the Mascot of little sycamores?"
},
{
"role": "assistant",
"content": "SELECT \"conference_joined\" FROM \"former_members\" WHERE \"mascot\"='little sycamores';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" text,\n \"conference_joined\" text\n);\n\nQuestion: Can you tell me the Location that has the Mascot of lakers?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"former_members\" WHERE \"mascot\"='lakers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_3_junior_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the time of the rider from the 348cc K4 Honda team with a speed of 97.743mph?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"race_3_junior_classic_race\" WHERE \"team\"='348cc k4 honda' AND \"speed\"='97.743mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the Lane of the swimmer with a Time of 8:34.25?"
},
{
"role": "assistant",
"content": "SELECT \"lane\" FROM \"heats\" WHERE \"time\"='8:34.25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the Name of the swimmer with a Time of 9:04.86 in Heat 2?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"heats\" WHERE \"heat\"=2 AND \"time\"='9:04.86';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the Location of the Event in Round 1 with a Time of 1:25?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"time\"='1:25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_players\" (\n \"position\" text,\n \"appearances\" real,\n \"goals\" real,\n \"first_appearance\" real,\n \"last_appearance\" real\n);\n\nQuestion: What is the average goals when the last appearance was before 1984, there were more than 17 appearances, the first appearance was before 1961 and the position was mf?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals\") FROM \"list_of_players\" WHERE \"last_appearance\"<1984 AND \"appearances\">17 AND \"first_appearance\"<1961 AND \"position\"='mf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: what is the school that left in 1966?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"former_members\" WHERE \"year_left\"=1966;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: what is the mascot for moores hill that joined later than 1952?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"year_joined\">1952 AND \"school\"='moores hill';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: what is the conference joined for the county 69 ripley in 1952 in versailles?"
},
{
"role": "assistant",
"content": "SELECT \"conference_joined\" FROM \"former_members\" WHERE \"county\"='69 ripley' AND \"year_joined\"=1952 AND \"location\"='versailles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: who is the mascot of the county 78 switzerland?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"county\"='78 switzerland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"react\" real,\n \"time\" real\n);\n\nQuestion: What is the total time of the athlete from Canada with a lane less than 8 and a rank less than 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"time\") FROM \"semifinal_1\" WHERE \"lane\"<8 AND \"nationality\"='canada' AND \"rank\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"react\" real,\n \"time\" real\n);\n\nQuestion: What is the total react number with a time less than 20.05 and a lane less than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"react\") FROM \"semifinal_1\" WHERE \"time\"<20.05 AND \"lane\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"react\" real,\n \"time\" real\n);\n\nQuestion: What is the average react of bryan barnett, who has a lane less than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"react\") FROM \"semifinal_1\" WHERE \"name\"='bryan barnett' AND \"lane\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: What year did the Hornets leave the conference?"
},
{
"role": "assistant",
"content": "SELECT \"year_left\" FROM \"former_members\" WHERE \"team_name\"='hornets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: In what city was the team that left the conference in 1949 based?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"former_members\" WHERE \"year_left\"='1949';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: What year did the team based in the city of Winamac join the conference?"
},
{
"role": "assistant",
"content": "SELECT \"year_joined\" FROM \"former_members\" WHERE \"city\"='winamac';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: From what county was the team that left the conference in 1993?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"former_members\" WHERE \"year_left\"='1993';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: From what school was the team that left the conference in 1992?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"former_members\" WHERE \"year_left\"='1992';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"county\" text,\n \"year_joined\" text,\n \"year_left\" text\n);\n\nQuestion: In what year did the team from the Western school join the conference?"
},
{
"role": "assistant",
"content": "SELECT \"year_joined\" FROM \"former_members\" WHERE \"school\"='western';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the place when less than 1 point is scored?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"place\") FROM \"results\" WHERE \"points\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the highest draw number when 23 points are scored?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draw\") FROM \"results\" WHERE \"points\"=23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the lowest heat that had a time of 1:02.85 in a lane larger than 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"heat\") FROM \"heats\" WHERE \"time\"='1:02.85' AND \"lane\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the sum of the lanes before heat 7 that elizabeth simmonds swam?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"heats\" WHERE \"heat\"<7 AND \"name\"='elizabeth simmonds';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"baden\" text,\n \"w_rttemberg\" text,\n \"nordbayern\" text,\n \"s_dbayern\" text\n);\n\nQuestion: What's the S\u00fcdbayern in 1928?"
},
{
"role": "assistant",
"content": "SELECT \"s_dbayern\" FROM \"1928_to_1933\" WHERE \"year\"=1928;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"baden\" text,\n \"w_rttemberg\" text,\n \"nordbayern\" text,\n \"s_dbayern\" text\n);\n\nQuestion: What's the W\u00fcrttemberg for Karlsruher FV happening after 1931?"
},
{
"role": "assistant",
"content": "SELECT \"w_rttemberg\" FROM \"1928_to_1933\" WHERE \"baden\"='karlsruher fv' AND \"year\">1931;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"baden\" text,\n \"w_rttemberg\" text,\n \"nordbayern\" text,\n \"s_dbayern\" text\n);\n\nQuestion: What's the year that has a Baden Freiburger FC?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"1928_to_1933\" WHERE \"baden\"='freiburger fc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"baden\" text,\n \"w_rttemberg\" text,\n \"nordbayern\" text,\n \"s_dbayern\" text\n);\n\nQuestion: What's the W\u00fcrttemberg in the year before 1929?"
},
{
"role": "assistant",
"content": "SELECT \"w_rttemberg\" FROM \"1928_to_1933\" WHERE \"year\"<1929;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"baden\" text,\n \"w_rttemberg\" text,\n \"nordbayern\" text,\n \"s_dbayern\" text\n);\n\nQuestion: What's the Nordbayern with a W\u00fcrttemberg of Union B\u00f6ckingen in the year before 1932?"
},
{
"role": "assistant",
"content": "SELECT \"nordbayern\" FROM \"1928_to_1933\" WHERE \"year\"<1932 AND \"w_rttemberg\"='union b\u00f6ckingen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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 was the high rebounds for the game that had a score of w 76-66?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"regular_season\" WHERE \"score\"='w 76-66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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 was the location/attendance for the game with a record of 16-6?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"regular_season\" WHERE \"record\"='16-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the nationality with a lane larger than 1, and a rank larger than 5, for Hsu Chi-Chieh?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_1\" WHERE \"lane\">1 AND \"rank\">5 AND \"name\"='hsu chi-chieh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the lane with a time of 1:56.64, and a tank smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"semifinal_1\" WHERE \"time\"='1:56.64' AND \"rank\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the rank of Japan?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"semifinal_1\" WHERE \"nationality\"='japan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the time for Russia?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_1\" WHERE \"nationality\"='russia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation has more than 0 silver medals and is ranked 1?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medals_table\" WHERE \"silver\">0 AND \"rank\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_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 rank of the country with total more than 3 and more than 6 silver?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"total\">3 AND \"silver\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_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 most silver won by the country with more than 1 gold, 3 bronze, ranked 1, and less than 12 as the total?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medals_table\" WHERE \"gold\">1 AND \"bronze\"=3 AND \"rank\"='1' AND \"total\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation has a total less than 11, more than 1 silver and less than 1 bronze?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medals_table\" WHERE \"total\"<11 AND \"silver\"<1 AND \"bronze\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_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 most silver won by Norway?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medals_table\" WHERE \"nation\"='norway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What district has a constituency of 60?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"constituency_number\"='60';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is district has a name of Rajnagar?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"name\"='rajnagar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score for the away team of Brentford?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='brentford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the tied game or the away team of Crewe Alexandra?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"second_round_proper\" WHERE \"away_team\"='crewe alexandra';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the date of the game for the Wrexham away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"second_round_proper\" WHERE \"away_team\"='wrexham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the date of the game for the HartlePool United team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"second_round_proper\" WHERE \"home_team\"='hartlepool united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"date\" text,\n \"show\" text,\n \"venue\" text,\n \"city\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue\" text\n);\n\nQuestion: What is the number of tickets sold and available for the concert at Long Beach Arena?"
},
{
"role": "assistant",
"content": "SELECT \"tickets_sold_available\" FROM \"box_office_score_data\" WHERE \"venue\"='long beach arena';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_score_data\" (\n \"date\" text,\n \"show\" text,\n \"venue\" text,\n \"city\" text,\n \"tickets_sold_available\" text,\n \"gross_revenue\" text\n);\n\nQuestion: Which city has a venue of the Arco Arena?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"box_office_score_data\" WHERE \"venue\"='arco arena';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the lowest round that has kazushi sakuraba as the opponent?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='kazushi sakuraba';"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Japan (JPN) with a total of less than 5, has what average gold medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='japan (jpn)' AND \"total\"<5;"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average bronze medal when gold is greater than 0, and there is less than 0 silver medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"gold\">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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of bronze medals when the rank is greater than 2, and less than 2 total medals with silver medals being more than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"rank\">2 AND \"total\"<2 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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: With a greater than 4 rank, and the silver medal greater than 0, and the bronze medal less than 1, what is the average total?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"rank\">4 AND \"silver\">0 AND \"bronze\"<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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest gold medals when the bronze medals is greater than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"bronze\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the player when the team is oakland raiders?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"fourth_round\" WHERE \"team\"='oakland raiders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the team when the college is virginia tech?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"fourth_round\" WHERE \"college\"='virginia tech';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college has a team of new york jets?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"fourth_round\" WHERE \"team\"='new york jets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What team has a pick larger than 30, when the college is saginaw valley state?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"fourth_round\" WHERE \"pick\">30 AND \"college\"='saginaw valley state';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest pick when the college is saginaw valley state?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"fourth_round\" WHERE \"college\"='saginaw valley state';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the record when the opponent is akiko inoue?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='akiko inoue';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: what is the even when the location is tokyo, japan and the record is 6-1?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='tokyo, japan' AND \"record\"='6-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"name\" text,\n \"altitude_meters\" real,\n \"range\" text,\n \"parent_range\" text\n);\n\nQuestion: Which range includes Mount Fukushima, and is ranked 38?"
},
{
"role": "assistant",
"content": "SELECT \"range\" FROM \"see_also\" WHERE \"name\"='mount fukushima' AND \"rank\"=38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"name\" text,\n \"altitude_meters\" real,\n \"range\" text,\n \"parent_range\" text\n);\n\nQuestion: What is the altitude (meters) is associated with the Name Mount Launoit, with the range as Belgica Mountains?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"altitude_meters\") FROM \"see_also\" WHERE \"range\"='belgica mountains' AND \"name\"='mount launoit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"name\" text,\n \"altitude_meters\" real,\n \"range\" text,\n \"parent_range\" text\n);\n\nQuestion: What is the Altitude (meters) associated with a rank smaller than 10, and the range M\u00fchlig-Hofmann Mountains?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"altitude_meters\") FROM \"see_also\" WHERE \"range\"='m\u00fchlig-hofmann mountains' AND \"rank\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"name\" text,\n \"altitude_meters\" real,\n \"range\" text,\n \"parent_range\" text\n);\n\nQuestion: What name is associated with a rank greater than 69, an altitude (meters) smaller than 2154, and a range of Sivorgfjella?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"see_also\" WHERE \"range\"='sivorgfjella' AND \"rank\">69 AND \"altitude_meters\"<2154;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"name\" text,\n \"altitude_meters\" real,\n \"range\" text,\n \"parent_range\" text\n);\n\nQuestion: What name is associated with a rank of less than 24, and an altitude (meters) of 3085?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"see_also\" WHERE \"rank\"<24 AND \"altitude_meters\"=3085;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"primary_conference\" text,\n \"county\" text\n);\n\nQuestion: What is the primary conference with a IHSAA Football Class of A, at South Decatur school?"
},
{
"role": "assistant",
"content": "SELECT \"primary_conference\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_football_class\"='a' AND \"school\"='south decatur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"primary_conference\" text,\n \"county\" text\n);\n\nQuestion: What is the Location with a county of 30 Hancock?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='30 hancock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"primary_conference\" text,\n \"county\" text\n);\n\nQuestion: What county has an IHSAA Football Class of A, and a Mascot of royals?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_football_class\"='a' AND \"mascot\"='royals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"primary_conference\" text,\n \"county\" text\n);\n\nQuestion: What school has a county of 69 ripley?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='69 ripley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What is the enrollment for the school with the mascot of the Fighting '59ers?"
},
{
"role": "assistant",
"content": "SELECT \"enrollment\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='fighting ''59ers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation has a total less than 2, silver of 1 and bronze less than 1?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medals_table\" WHERE \"total\"<2 AND \"bronze\"<1 AND \"silver\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the total with silver being less than 0, less than 1 gold, and 3 bronze?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"medals_table\" WHERE \"bronze\"=3 AND \"gold\"<1 AND \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's Australia's time in the heat more than 4?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"heats\" WHERE \"heat\">4 AND \"nationality\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's Sara Isakovi\u010d's lane number that had a heat of 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"heats\" WHERE \"heat\"=3 AND \"name\"='sara isakovi\u010d';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's the heat that was timed 2:08.54?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"heat\") FROM \"heats\" WHERE \"time\"='2:08.54';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: Who is the Director of Fish Tales?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1936\" WHERE \"title\"='fish tales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What was released on 1936-08-29?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1936\" WHERE \"release_date\"='1936-08-29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What is the release date of Milk and Money?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1936\" WHERE \"title\"='milk and money';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What is the release date of I Wanna Play House?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1936\" WHERE \"title\"='i wanna play house';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: Who is the director of Little Beau Porky?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1936\" WHERE \"title\"='little beau porky';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What is the release date of The Blow Out?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1936\" WHERE \"title\"='the blow out';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Who was the author for company Buzz Productions Theater?"
},
{
"role": "assistant",
"content": "SELECT \"author\" FROM \"references\" WHERE \"company\"='buzz productions theater';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What country had the play Cyclops?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"references\" WHERE \"play\"='cyclops';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What country had the play Medea?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"references\" WHERE \"play\"='medea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What play is from the country Belgium?"
},
{
"role": "assistant",
"content": "SELECT \"play\" FROM \"references\" WHERE \"country\"='belgium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What play has a base of Athens and was written by Aeschylus?"
},
{
"role": "assistant",
"content": "SELECT \"play\" FROM \"references\" WHERE \"author\"='aeschylus' AND \"base\"='athens';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What is the company from Greece with author Aeschylus?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"references\" WHERE \"country\"='greece' AND \"author\"='aeschylus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"coaster_name\" text,\n \"park\" text,\n \"location\" text,\n \"track\" text,\n \"builder\" text,\n \"year_opened\" text\n);\n\nQuestion: What is the coaster name that was opened in 1978, and have wooden track?"
},
{
"role": "assistant",
"content": "SELECT \"coaster_name\" FROM \"examples\" WHERE \"year_opened\"='1978' AND \"track\"='wooden';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"coaster_name\" text,\n \"park\" text,\n \"location\" text,\n \"track\" text,\n \"builder\" text,\n \"year_opened\" text\n);\n\nQuestion: Which year opened has le monstre coaster?"
},
{
"role": "assistant",
"content": "SELECT \"year_opened\" FROM \"examples\" WHERE \"coaster_name\"='le monstre';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"coaster_name\" text,\n \"park\" text,\n \"location\" text,\n \"track\" text,\n \"builder\" text,\n \"year_opened\" text\n);\n\nQuestion: Which coaster is located in sandusky, Ohio?"
},
{
"role": "assistant",
"content": "SELECT \"coaster_name\" FROM \"examples\" WHERE \"location\"='sandusky, ohio';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples\" (\n \"coaster_name\" text,\n \"park\" text,\n \"location\" text,\n \"track\" text,\n \"builder\" text,\n \"year_opened\" text\n);\n\nQuestion: Which year opened is located in west mifflin, pennsylvania?"
},
{
"role": "assistant",
"content": "SELECT \"year_opened\" FROM \"examples\" WHERE \"location\"='west mifflin, pennsylvania';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the lowest league cup goals for the entry with fa cup goals greater than 0 and FA cup apps larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"league_cup_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\">0 AND \"fa_cup_apps\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the sum of league cup appearances for the players with FA cup goals larger than 0 and FA cup appearances less than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_cup_apps\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\">0 AND \"fa_cup_apps\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the highest league cup appearances for the player with league cup goals of 0, and FA cup appearances of 2, and 4 league goals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_cup_apps\") FROM \"appearances_and_goals\" WHERE \"league_cup_goals\"=0 AND \"fa_cup_apps\"=2 AND \"league_goals\"=4;"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What game was played at Omni Coliseum with a w 105-95 score?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"location_attendance\"='omni coliseum' AND \"score\"='w 105-95';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When did the team have a 10-8 record?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='10-8';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When was 11-8 the record?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='11-8';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.