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 \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest heat when the nationality is poland, and the lane is smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"heat\") FROM \"heats\" WHERE \"nationality\"='poland' AND \"lane\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"type_ii\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: Which Lead Pitch/mm has a Body Width/mm larger than 10.16?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lead_pitch_mm\") FROM \"type_ii\" WHERE \"body_width_mm\">10.16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"type_ii\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: How much Body Width/mm has a Part Number of tsop40/44, and a Body Length/mm smaller than 18.42?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"body_width_mm\") FROM \"type_ii\" WHERE \"part_number\"='tsop40/44' AND \"body_length_mm\"<18.42;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"type_ii\" (\n \"part_number\" text,\n \"pins\" text,\n \"body_width_mm\" real,\n \"body_length_mm\" real,\n \"lead_pitch_mm\" real\n);\n\nQuestion: Which Lead Pitch/mm has a Part Number of tsop24/28?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lead_pitch_mm\") FROM \"type_ii\" WHERE \"part_number\"='tsop24/28';"
}
]
|
[
{
"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);\n\nQuestion: What is the highest amount of silver when gold is 1 and bronze larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"gold\"=1 AND \"bronze\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"reaction_time\" real\n);\n\nQuestion: What is the Time of the Athlete with a Reaction time of 0.164?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"time\") FROM \"final\" WHERE \"reaction_time\"=0.164;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"reaction_time\" real\n);\n\nQuestion: What is the Time of the Athlete in Lane 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"time\") FROM \"final\" WHERE \"lane\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"reaction_time\" real\n);\n\nQuestion: What is the Lane of the Athlete from Great Britain with a Reaction time of less than 0.218 and a Time larger than 44.74?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"final\" WHERE \"reaction_time\"<0.218 AND \"time\">44.74 AND \"nationality\"='great britain';"
}
]
|
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the time in week 3?"
},
{
"role": "assistant",
"content": "SELECT \"tv_time\" FROM \"schedule\" WHERE \"week\"=3;"
}
]
|
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the week with attendance of 73,572?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\"='73,572';"
}
]
|
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What week was the opponent the San Diego Chargers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='san diego chargers';"
}
]
|
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What week was the result of l 38\u201321?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"result\"='l 38\u201321';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What's the total of Rank for the County of Galway and has a Total that's larger than 13?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"single_game\" WHERE \"county\"='galway' AND \"total\">13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What County has an Opposition of Antrim and the Player Bernie Forde?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"single_game\" WHERE \"opposition\"='antrim' AND \"player\"='bernie forde';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What's the highest Rank for the County of Offaly, the Player of Mark Corrigan, and the Total that is smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"single_game\" WHERE \"county\"='offaly' AND \"player\"='mark corrigan' AND \"total\"<8;"
}
]
|
[
{
"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 \"channel\" text,\n \"stadium\" text,\n \"attendance\" text\n);\n\nQuestion: Which Channel has an Opponent of washington redskins?"
},
{
"role": "assistant",
"content": "SELECT \"channel\" FROM \"schedule\" WHERE \"opponent\"='washington redskins';"
}
]
|
[
{
"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 \"channel\" text,\n \"stadium\" text,\n \"attendance\" text\n);\n\nQuestion: Which attendance has a Channel of espn, and a Date of september 5, 2002?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"channel\"='espn' AND \"date\"='september 5, 2002';"
}
]
|
[
{
"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 \"channel\" text,\n \"stadium\" text,\n \"attendance\" text\n);\n\nQuestion: Which Date has a Result of w 27\u201320?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 27\u201320';"
}
]
|
[
{
"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 \"channel\" text,\n \"stadium\" text,\n \"attendance\" text\n);\n\nQuestion: Which Week has an Attendance of 63,447?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"attendance\"='63,447';"
}
]
|
[
{
"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 \"channel\" text,\n \"stadium\" text,\n \"attendance\" text\n);\n\nQuestion: Which Date has a Stadium of giants stadium, and a Week smaller than 13, and an Opponent of seattle seahawks?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"stadium\"='giants stadium' AND \"week\"<13 AND \"opponent\"='seattle seahawks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Who was the athlete with react of 0.185?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"heat_2\" WHERE \"react\"=0.185;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"react\") FROM \"heat_2\" WHERE \"lane\">3 AND \"time\"<20.3 AND \"nationality\"='zimbabwe' AND \"rank\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"racial_composition\" (\n \"municipality_2010\" text,\n \"white_both_hispanic_and_non_hispanic\" real,\n \"black_both_hispanic_and_non_hispanic\" real,\n \"amerindian_both_hispanic_and_non_hispanic\" real,\n \"n_asia_both_hispanic_and_non_hispanic\" real,\n \"multiracial_both_hispanic_and_non_hispanic\" real,\n \"hispanic_of_any_race\" real\n);\n\nQuestion: What is the total number of white (Hispanic/Non-Hispanic) having a black (Hispanic/Non-Hispanic) of 9.9 and Hispanic under 99.5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"white_both_hispanic_and_non_hispanic\") FROM \"racial_composition\" WHERE \"black_both_hispanic_and_non_hispanic\"=9.9 AND \"hispanic_of_any_race\"<99.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"racial_composition\" (\n \"municipality_2010\" text,\n \"white_both_hispanic_and_non_hispanic\" real,\n \"black_both_hispanic_and_non_hispanic\" real,\n \"amerindian_both_hispanic_and_non_hispanic\" real,\n \"n_asia_both_hispanic_and_non_hispanic\" real,\n \"multiracial_both_hispanic_and_non_hispanic\" real,\n \"hispanic_of_any_race\" real\n);\n\nQuestion: What is the average black value (Hispanic/Non-Hispanic) having a white (Hispanic/Non-Hispanic) under 61.9, Multiracial (Hispanic/Non-Hispanic) under 12.5 and Hispanic under 99.4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"black_both_hispanic_and_non_hispanic\") FROM \"racial_composition\" WHERE \"white_both_hispanic_and_non_hispanic\"<61.9 AND \"multiracial_both_hispanic_and_non_hispanic\"<12.5 AND \"hispanic_of_any_race\"<99.4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"racial_composition\" (\n \"municipality_2010\" text,\n \"white_both_hispanic_and_non_hispanic\" real,\n \"black_both_hispanic_and_non_hispanic\" real,\n \"amerindian_both_hispanic_and_non_hispanic\" real,\n \"n_asia_both_hispanic_and_non_hispanic\" real,\n \"multiracial_both_hispanic_and_non_hispanic\" real,\n \"hispanic_of_any_race\" real\n);\n\nQuestion: What is the highest Amerindian (Hispanic/Non-Hispanic) value having a Black (Hispanic/Non-Hispanic) of 15.7 and White (Hispanic/Non-Hispanic) over 69.5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"amerindian_both_hispanic_and_non_hispanic\") FROM \"racial_composition\" WHERE \"black_both_hispanic_and_non_hispanic\"=15.7 AND \"white_both_hispanic_and_non_hispanic\">69.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"racial_composition\" (\n \"municipality_2010\" text,\n \"white_both_hispanic_and_non_hispanic\" real,\n \"black_both_hispanic_and_non_hispanic\" real,\n \"amerindian_both_hispanic_and_non_hispanic\" real,\n \"n_asia_both_hispanic_and_non_hispanic\" real,\n \"multiracial_both_hispanic_and_non_hispanic\" real,\n \"hispanic_of_any_race\" real\n);\n\nQuestion: What is the Black (Hispanic/Non-Hispanic) value having a white (Hispanic/Non-Hispanic) under 80.6, Asian (Hispanic/Non-Hispanic) of 0.1, Amerindian (Hispanic/Non-Hispanic) under 0.6000000000000001, and municipality of Vega Baja?"
},
{
"role": "assistant",
"content": "SELECT \"black_both_hispanic_and_non_hispanic\" FROM \"racial_composition\" WHERE \"white_both_hispanic_and_non_hispanic\"<80.6 AND \"n_asia_both_hispanic_and_non_hispanic\"=0.1 AND \"amerindian_both_hispanic_and_non_hispanic\"<0.6000000000000001 AND \"municipality_2010\"='vega baja';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"season\" text,\n \"div\" text,\n \"pos\" text,\n \"pld\" text,\n \"pts\" text\n);\n\nQuestion: What season had 3rd position, a 36 pld, and a bbl div?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season_records\" WHERE \"pos\"='3rd' AND \"pld\"='36' AND \"div\"='bbl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"season\" text,\n \"div\" text,\n \"pos\" text,\n \"pld\" text,\n \"pts\" text\n);\n\nQuestion: What season has 36 pld, a bbl div, and 6th position?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season_records\" WHERE \"pld\"='36' AND \"div\"='bbl' AND \"pos\"='6th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"season\" text,\n \"div\" text,\n \"pos\" text,\n \"pld\" text,\n \"pts\" text\n);\n\nQuestion: What season had 6th position and 36 points?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season_records\" WHERE \"pos\"='6th' AND \"pts\"='36';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"season\" text,\n \"div\" text,\n \"pos\" text,\n \"pld\" text,\n \"pts\" text\n);\n\nQuestion: What season had 1st position, 33 pld, and 58 points?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season_records\" WHERE \"pos\"='1st' AND \"pld\"='33' AND \"pts\"='58';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wales\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: Which player had a Cross Code Debut of the RL test v France, International Debut of RU Test v Ireland in years after 1955?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"wales\" WHERE \"cross_code_debut\"='rl test v france' AND \"year\">1955 AND \"int_l_debut\"='ru test v ireland';"
}
]
|
[
{
"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 \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text\n);\n\nQuestion: Which School has a Mascot of generals?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='generals';"
}
]
|
[
{
"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 \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text\n);\n\nQuestion: Which School has an IHSAA Class of aaa, and a Mascot of saints?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aaa' AND \"mascot\"='saints';"
}
]
|
[
{
"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 \"num_county\" text\n);\n\nQuestion: What is the highest enrollment in Lagrange where the mascot is panthers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='lagrange' AND \"mascot\"='panthers';"
}
]
|
[
{
"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 \"num_county\" text\n);\n\nQuestion: What is the enrollment at the school of Hamilton community?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='hamilton community';"
}
]
|
[
{
"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 \"num_county\" text\n);\n\nQuestion: What school that has a IHSAA Class of AA, in Butler?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aa' AND \"location\"='butler';"
}
]
|
[
{
"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 \"num_county\" text\n);\n\nQuestion: What is the mascot at Hamilton Community?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='hamilton community';"
}
]
|
[
{
"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 \"num_county\" text\n);\n\nQuestion: What school is in Lagrange, with an IHSAA Class of aaa?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='lagrange' AND \"ihsaa_class\"='aaa';"
}
]
|
[
{
"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 \"num_county\" text\n);\n\nQuestion: What school is in Ligonier?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='ligonier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_most_olympic_medals_over_career\" (\n \"rank\" real,\n \"nation\" text,\n \"sport\" text,\n \"years\" text,\n \"games\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total in 2000\u20132012, with more than 2 silver, 0 Bronze, and a Rank smaller than 70?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"list_of_most_olympic_medals_over_career\" WHERE \"years\"='2000\u20132012' AND \"silver\">2 AND \"bronze\"=0 AND \"rank\"<70;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_most_olympic_medals_over_career\" (\n \"rank\" real,\n \"nation\" text,\n \"sport\" text,\n \"years\" text,\n \"games\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation scored 7 in shooting in 1920?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"list_of_most_olympic_medals_over_career\" WHERE \"sport\"='shooting' AND \"total\"=7 AND \"years\"='1920';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"amateur_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What's the average Round of Pete Laframboise?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"amateur_draft\" WHERE \"player\"='pete laframboise';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"amateur_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What country is Pick 100?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"amateur_draft\" WHERE \"pick\"=100;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who were the rowers for Great britain?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"heat_2\" WHERE \"country\"='great britain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What country has a time of 7:28.66 and a rank less than 3?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"heat_2\" WHERE \"rank\"<3 AND \"time\"='7:28.66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes when the time was 7:42.92 and the rank is more than 1?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"heat_2\" WHERE \"rank\">1 AND \"time\"='7:42.92';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What's the score of Tie number 11?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What's the tie number when the away team was Mansfield Town?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fourth_round_proper\" WHERE \"away_team\"='mansfield town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was Newcastle United the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='newcastle united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team when Brighton & Hove Albion was home?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"home_team\"='brighton & hove albion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What's the tie number of Chelsea when they were home?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fourth_round_proper\" WHERE \"home_team\"='chelsea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What's the score when Orient was home?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"home_team\"='orient';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"restaurant_name\" text,\n \"original_name\" text,\n \"location\" text,\n \"chef\" text,\n \"designer\" text,\n \"still_open\" text\n);\n\nQuestion: What designer has a restaurant named The Citizen?"
},
{
"role": "assistant",
"content": "SELECT \"designer\" FROM \"season_4\" WHERE \"restaurant_name\"='the citizen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"restaurant_name\" text,\n \"original_name\" text,\n \"location\" text,\n \"chef\" text,\n \"designer\" text,\n \"still_open\" text\n);\n\nQuestion: What is the original name of the place by designer Glen Peloso with a Location of n/a?"
},
{
"role": "assistant",
"content": "SELECT \"original_name\" FROM \"season_4\" WHERE \"designer\"='glen peloso' AND \"location\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"restaurant_name\" text,\n \"original_name\" text,\n \"location\" text,\n \"chef\" text,\n \"designer\" text,\n \"still_open\" text\n);\n\nQuestion: What chef that has a location in Toronto, ON, that has n/a as the original name, and a Restaurant Name of Bagel World?"
},
{
"role": "assistant",
"content": "SELECT \"chef\" FROM \"season_4\" WHERE \"location\"='toronto, on' AND \"original_name\"='n/a' AND \"restaurant_name\"='bagel world';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"restaurant_name\" text,\n \"original_name\" text,\n \"location\" text,\n \"chef\" text,\n \"designer\" text,\n \"still_open\" text\n);\n\nQuestion: What is the name of the restaurant originally named Essence?"
},
{
"role": "assistant",
"content": "SELECT \"restaurant_name\" FROM \"season_4\" WHERE \"original_name\"='essence';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"restaurant_name\" text,\n \"original_name\" text,\n \"location\" text,\n \"chef\" text,\n \"designer\" text,\n \"still_open\" text\n);\n\nQuestion: What designer has a restaurant named of Cork & Cabbage?"
},
{
"role": "assistant",
"content": "SELECT \"designer\" FROM \"season_4\" WHERE \"restaurant_name\"='cork & cabbage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_who_have_tested_positive_for_ban\" (\n \"athlete\" text,\n \"nation\" text,\n \"olympics\" real,\n \"substance\" text,\n \"punishment\" text\n);\n\nQuestion: Which athlete had a six month suspension from IIHF?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"players_who_have_tested_positive_for_ban\" WHERE \"punishment\"='six month suspension from iihf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals did the team have with 0 total silver and less than 3 total medals?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"world_championships_total_medals\" WHERE \"total\"<3 AND \"silver\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\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 bronze medals for the team with more than 4 silver and less than 30 gold medals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"world_championships_total_medals\" WHERE \"silver\">4 AND \"nation\"='total' AND \"gold\"<30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dressage\" (\n \"rank\" text,\n \"rider\" text,\n \"horse\" text,\n \"nation\" text,\n \"judge_e\" text,\n \"judge_c\" text,\n \"judge_m\" text,\n \"penalty_points\" real\n);\n\nQuestion: what is the least penalty points when the judge e is 72.22?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"penalty_points\") FROM \"dressage\" WHERE \"judge_e\"='72.22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dressage\" (\n \"rank\" text,\n \"rider\" text,\n \"horse\" text,\n \"nation\" text,\n \"judge_e\" text,\n \"judge_c\" text,\n \"judge_m\" text,\n \"penalty_points\" real\n);\n\nQuestion: what is the judge e when judge c is 56.67 and the rider is dag albert?"
},
{
"role": "assistant",
"content": "SELECT \"judge_e\" FROM \"dressage\" WHERE \"judge_c\"='56.67' AND \"rider\"='dag albert';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dressage\" (\n \"rank\" text,\n \"rider\" text,\n \"horse\" text,\n \"nation\" text,\n \"judge_e\" text,\n \"judge_c\" text,\n \"judge_m\" text,\n \"penalty_points\" real\n);\n\nQuestion: what is the nation when the penalty points is less than 40.2 and judge e is 82.22?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"dressage\" WHERE \"penalty_points\"<40.2 AND \"judge_e\"='82.22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dressage\" (\n \"rank\" text,\n \"rider\" text,\n \"horse\" text,\n \"nation\" text,\n \"judge_e\" text,\n \"judge_c\" text,\n \"judge_m\" text,\n \"penalty_points\" real\n);\n\nQuestion: what is the rank when judge m is 65.93 and judge e is 65.56?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"dressage\" WHERE \"judge_m\"='65.93' AND \"judge_e\"='65.56';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dressage\" (\n \"rank\" text,\n \"rider\" text,\n \"horse\" text,\n \"nation\" text,\n \"judge_e\" text,\n \"judge_c\" text,\n \"judge_m\" text,\n \"penalty_points\" real\n);\n\nQuestion: what is the horse that ranked 69?"
},
{
"role": "assistant",
"content": "SELECT \"horse\" FROM \"dressage\" WHERE \"rank\"='69';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1941\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: Name the Production Number with a Director of friz freleng, and a Title of wacky worm, the?"
},
{
"role": "assistant",
"content": "SELECT \"production_number\" FROM \"1941\" WHERE \"director\"='friz freleng' AND \"title\"='wacky worm, the';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1941\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: Name the Series with Production Number of 95, br 1254?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"1941\" WHERE \"production_number\"='95, br 1254';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1941\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: Which reissue has a Production Number of 9853?"
},
{
"role": "assistant",
"content": "SELECT \"reissue\" FROM \"1941\" WHERE \"production_number\"='9853';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1941\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: Name the Series with a Title of elmer's pet rabbit?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"1941\" WHERE \"title\"='elmer''s pet rabbit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house\" text,\n \"abbr\" text,\n \"type\" text,\n \"colour\" text,\n \"boarding_day\" text\n);\n\nQuestion: What is the Boarding/Day value for a type of old and house of Saunderites?"
},
{
"role": "assistant",
"content": "SELECT \"boarding_day\" FROM \"houses\" WHERE \"type\"='old' AND \"house\"='saunderites';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house\" text,\n \"abbr\" text,\n \"type\" text,\n \"colour\" text,\n \"boarding_day\" text\n);\n\nQuestion: Which house has an abbreviation of G?"
},
{
"role": "assistant",
"content": "SELECT \"house\" FROM \"houses\" WHERE \"abbr\"='g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house\" text,\n \"abbr\" text,\n \"type\" text,\n \"colour\" text,\n \"boarding_day\" text\n);\n\nQuestion: Which house has a Boarding/Day value of Day?"
},
{
"role": "assistant",
"content": "SELECT \"house\" FROM \"houses\" WHERE \"boarding_day\"='day';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house\" text,\n \"abbr\" text,\n \"type\" text,\n \"colour\" text,\n \"boarding_day\" text\n);\n\nQuestion: Which house has an abbreviation of D?"
},
{
"role": "assistant",
"content": "SELECT \"house\" FROM \"houses\" WHERE \"abbr\"='d';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house\" text,\n \"abbr\" text,\n \"type\" text,\n \"colour\" text,\n \"boarding_day\" text\n);\n\nQuestion: Which type has an abbreviation of B and Boarding/Day value of Boarding?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"houses\" WHERE \"boarding_day\"='boarding' AND \"abbr\"='b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"houses\" (\n \"house\" text,\n \"abbr\" text,\n \"type\" text,\n \"colour\" text,\n \"boarding_day\" text\n);\n\nQuestion: Which type has a color of Dark Blue?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"houses\" WHERE \"colour\"='dark blue';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" real,\n \"team\" text,\n \"league\" text,\n \"games\" text,\n \"total_tackles\" text,\n \"solo\" text,\n \"tfl\" text,\n \"sacks\" text,\n \"int\" text\n);\n\nQuestion: what is the total tackles when the games is 16 and solo is 88?"
},
{
"role": "assistant",
"content": "SELECT \"total_tackles\" FROM \"statistics\" WHERE \"games\"='16' AND \"solo\"='88';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" real,\n \"team\" text,\n \"league\" text,\n \"games\" text,\n \"total_tackles\" text,\n \"solo\" text,\n \"tfl\" text,\n \"sacks\" text,\n \"int\" text\n);\n\nQuestion: what is the team when sacks is 0 and the season is earlier than 1998?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"statistics\" WHERE \"sacks\"='0' AND \"season\"<1998;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" real,\n \"team\" text,\n \"league\" text,\n \"games\" text,\n \"total_tackles\" text,\n \"solo\" text,\n \"tfl\" text,\n \"sacks\" text,\n \"int\" text\n);\n\nQuestion: what is solo when total tackles is 6?"
},
{
"role": "assistant",
"content": "SELECT \"solo\" FROM \"statistics\" WHERE \"total_tackles\"='6';"
}
]
|
[
{
"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\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many FA cup goals did dick taylor score in the year that he had 0 league goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"fa_cup_goals\") FROM \"appearances_and_goals\" WHERE \"name\"='dick taylor' AND \"league_goals\"<0;"
}
]
|
[
{
"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\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the goals number of goals for the player who had 2 league cup apps and 0 FA cup goals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"league_cup_apps\"='2' AND \"fa_cup_goals\"<0;"
}
]
|
[
{
"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 result of week 11?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=11;"
}
]
|
[
{
"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\" real\n);\n\nQuestion: What is Lisbeth Trickett's time?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"time\") FROM \"semifinal_1\" WHERE \"name\"='lisbeth trickett';"
}
]
|
[
{
"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\" real\n);\n\nQuestion: What is the average rank for 57.05 time?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"semifinal_1\" WHERE \"time\"<57.05;"
}
]
|
[
{
"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\" real\n);\n\nQuestion: What lane is from Great Britain and a 57.78 time?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"semifinal_1\" WHERE \"nationality\"='great britain' AND \"time\">57.78;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"name\" text,\n \"network\" text,\n \"owner\" text,\n \"launch_date\" text,\n \"channel_bkk\" text,\n \"broadcasting_area\" text,\n \"transmitted_area\" text,\n \"broadcasting_hours\" text\n);\n\nQuestion: Who's the owner of Sanam Pao as the broadcasting area?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"analogue_terrestrial_television\" WHERE \"broadcasting_area\"='sanam pao';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"name\" text,\n \"network\" text,\n \"owner\" text,\n \"launch_date\" text,\n \"channel_bkk\" text,\n \"broadcasting_area\" text,\n \"transmitted_area\" text,\n \"broadcasting_hours\" text\n);\n\nQuestion: Who's the owner of channel 3/32 (vhf/uhf) broadcasting 24-hours?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"analogue_terrestrial_television\" WHERE \"broadcasting_hours\"='24-hours' AND \"channel_bkk\"='3/32 (vhf/uhf)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"name\" text,\n \"network\" text,\n \"owner\" text,\n \"launch_date\" text,\n \"channel_bkk\" text,\n \"broadcasting_area\" text,\n \"transmitted_area\" text,\n \"broadcasting_hours\" text\n);\n\nQuestion: Who's the owner of Thai PBS?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"analogue_terrestrial_television\" WHERE \"name\"='thai pbs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"name\" text,\n \"network\" text,\n \"owner\" text,\n \"launch_date\" text,\n \"channel_bkk\" text,\n \"broadcasting_area\" text,\n \"transmitted_area\" text,\n \"broadcasting_hours\" text\n);\n\nQuestion: What's the network of BBTV Channel 7?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"analogue_terrestrial_television\" WHERE \"name\"='bbtv channel 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"name\" text,\n \"network\" text,\n \"owner\" text,\n \"launch_date\" text,\n \"channel_bkk\" text,\n \"broadcasting_area\" text,\n \"transmitted_area\" text,\n \"broadcasting_hours\" text\n);\n\nQuestion: What's the name of Channel 29 (UHF)?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"analogue_terrestrial_television\" WHERE \"channel_bkk\"='29 (uhf)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analogue_terrestrial_television\" (\n \"name\" text,\n \"network\" text,\n \"owner\" text,\n \"launch_date\" text,\n \"channel_bkk\" text,\n \"broadcasting_area\" text,\n \"transmitted_area\" text,\n \"broadcasting_hours\" text\n);\n\nQuestion: What's the broadcasting hours of NBT?"
},
{
"role": "assistant",
"content": "SELECT \"broadcasting_hours\" FROM \"analogue_terrestrial_television\" WHERE \"network\"='nbt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who were the runners-up in the tournament on May 26, 1996?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"lpga_tour_wins_13\" WHERE \"date\"='may 26, 1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which tournament had a runner-up of Val Skinner?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"lpga_tour_wins_13\" WHERE \"runner_s_up\"='val skinner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was Rosie's winning score on Apr 29, 2001?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"lpga_tour_wins_13\" WHERE \"date\"='apr 29, 2001';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1947\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: What was the release date of the feature with a production number of 1018, BR 1352?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1947\" WHERE \"production_number\"='1018, br 1352';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1947\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: What is the reissue value for the feature titled \"Catch as Cats Can\"?"
},
{
"role": "assistant",
"content": "SELECT \"reissue\" FROM \"1947\" WHERE \"title\"='catch as cats can';"
}
]
|
[
{
"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 the name when the constituency number is 150?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"constituency_number\"='150';"
}
]
|
[
{
"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 the total number of electorates (2009) when the name is govindpura?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number_of_electorates_2009\") FROM \"assembly_segments\" WHERE \"name\"='govindpura';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_medals\" (\n \"rank\" real,\n \"province\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the rank of Si Sa Ket province with less than 14 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"top_ten_medals\" WHERE \"province\"='si sa ket' AND \"bronze\"<14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_medals\" (\n \"rank\" real,\n \"province\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many total medals does rank 3 with less than 40 silver medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"top_ten_medals\" WHERE \"silver\"<40 AND \"rank\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_medals\" (\n \"rank\" real,\n \"province\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many average gold medals for provinces higher than rank 9 with 25 bronzes?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"top_ten_medals\" WHERE \"bronze\"=25 AND \"rank\"<9;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.