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 \"critical_temperature_t_c_crystal_structu\" (\n \"formula\" text,\n \"notation\" text,\n \"t_c_k\" real,\n \"no_of_cu_o_planes_in_unit_cell\" real,\n \"crystal_structure\" text\n);\n\nQuestion: Which crystal structures has a Tc(K) of 110 and the number of Cu-O planes in the unit cell is 3?"
},
{
"role": "assistant",
"content": "SELECT \"crystal_structure\" FROM \"critical_temperature_t_c_crystal_structu\" WHERE \"no_of_cu_o_planes_in_unit_cell\"=3 AND \"t_c_k\"=110;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the gold with total larger than 33"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"total\">33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the fewest gold for tanzania with bronze less than 0"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"nation\"='tanzania' AND \"bronze\"<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: Who is the opponent for week 10?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=10;"
}
] |
[
{
"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: For countries that won more than 32 gold medals, what was the highest number of golds?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"total\">32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australasian_championships\" (\n \"year\" real,\n \"host\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: Tell me fourth place for year of 2010"
},
{
"role": "assistant",
"content": "SELECT \"fourth_place\" FROM \"australasian_championships\" WHERE \"year\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the result for 2010 fifa world cup qualification"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"competition\"='2010 fifa world cup qualification';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the date for 2010 fifa world cup qualification"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2010 fifa world cup qualification';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_8_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Tell me the surface for november 28, 2010"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_8_1\" WHERE \"date\"='november 28, 2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_8_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Tell me the tournament with a hard surface for 6\u20131, 6\u20132"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_8_1\" WHERE \"surface\"='hard' AND \"score\"='6\u20131, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_8_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Tell me the date for 6\u20133, 6\u20132"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_8_1\" WHERE \"score\"='6\u20133, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_8_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Tell me the date for johanna konta"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_8_1\" WHERE \"opponent_in_the_final\"='johanna konta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970_isle_of_man_production_500_cc_tt_fi\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the time value for the rider Brian Finch and a rank greater than 3?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"1970_isle_of_man_production_500_cc_tt_fi\" WHERE \"rank\">3 AND \"rider\"='brian finch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"prizes_and_awards\" (\n \"year\" real,\n \"director\" text,\n \"project\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What result does the project Once Upon A Time In The West, directed by Sergio Leone have?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"prizes_and_awards\" WHERE \"director\"='sergio leone' AND \"project\"='once upon a time in the west';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"prizes_and_awards\" (\n \"year\" real,\n \"director\" text,\n \"project\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What year was Bulworth nominated?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"prizes_and_awards\" WHERE \"project\"='bulworth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"prizes_and_awards\" (\n \"year\" real,\n \"director\" text,\n \"project\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What is the average Year for the project The Untouchables?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"prizes_and_awards\" WHERE \"project\"='the untouchables';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text\n);\n\nQuestion: Tell me the section for position of 8th and season of 2003"
},
{
"role": "assistant",
"content": "SELECT \"section\" FROM \"season_to_season\" WHERE \"position\"='8th' AND \"season\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the date of week 17?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the latest week that the Tampa Bay Buccaneers were an opponent?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"opponent\"='tampa bay buccaneers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"points\" real,\n \"name\" text,\n \"club\" text,\n \"tries\" real,\n \"drop\" real\n);\n\nQuestion: Name the fewest tries for leicester tigers with points less than 207"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tries\") FROM \"points\" WHERE \"club\"='leicester tigers' AND \"points\"<207;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_07_york_city_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Name the date of st albans city for result of drew 0-0"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2006_07_york_city_f_c_season\" WHERE \"opponent\"='st albans city' AND \"result\"='drew 0-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_07_york_city_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Name the venue for 15 august 2006"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2006_07_york_city_f_c_season\" WHERE \"date\"='15 august 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_07_york_city_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Name the most attendance for tamworth with home venue"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"2006_07_york_city_f_c_season\" WHERE \"opponent\"='tamworth' AND \"venue\"='home';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_07_york_city_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Name the least attendance for 10 october 2006"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"2006_07_york_city_f_c_season\" WHERE \"date\"='10 october 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: I want the average bronze for total of 19 and silver of 8 with rank of 31"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"total\"=19 AND \"silver\"=8 AND \"rank\"='31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the average bronze for rank of 43 and total less than 11"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='43' AND \"total\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"affiliates\" (\n \"calls\" text,\n \"frequency\" text,\n \"branding\" text,\n \"format\" text,\n \"timeslot\" text,\n \"group_owner\" text\n);\n\nQuestion: Say the frequency of 1290 khz"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"affiliates\" WHERE \"frequency\"='1290 khz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"affiliates\" (\n \"calls\" text,\n \"frequency\" text,\n \"branding\" text,\n \"format\" text,\n \"timeslot\" text,\n \"group_owner\" text\n);\n\nQuestion: Tell me the timeslot of calls of wrko"
},
{
"role": "assistant",
"content": "SELECT \"timeslot\" FROM \"affiliates\" WHERE \"calls\"='wrko';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"affiliates\" (\n \"calls\" text,\n \"frequency\" text,\n \"branding\" text,\n \"format\" text,\n \"timeslot\" text,\n \"group_owner\" text\n);\n\nQuestion: Tell me the format for calls of wrko"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"affiliates\" WHERE \"calls\"='wrko';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"affiliates\" (\n \"calls\" text,\n \"frequency\" text,\n \"branding\" text,\n \"format\" text,\n \"timeslot\" text,\n \"group_owner\" text\n);\n\nQuestion: Tell me the calls for frequency of 1290 khz"
},
{
"role": "assistant",
"content": "SELECT \"calls\" FROM \"affiliates\" WHERE \"frequency\"='1290 khz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"affiliates\" (\n \"calls\" text,\n \"frequency\" text,\n \"branding\" text,\n \"format\" text,\n \"timeslot\" text,\n \"group_owner\" text\n);\n\nQuestion: Tell me the branding for frequency of 680 khz"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"affiliates\" WHERE \"frequency\"='680 khz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"affiliates\" (\n \"calls\" text,\n \"frequency\" text,\n \"branding\" text,\n \"format\" text,\n \"timeslot\" text,\n \"group_owner\" text\n);\n\nQuestion: Tell me the timeslot for calls of whyn"
},
{
"role": "assistant",
"content": "SELECT \"timeslot\" FROM \"affiliates\" WHERE \"calls\"='whyn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" text\n);\n\nQuestion: For how long did Bolivia have a lane greater than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"time\") FROM \"heats\" WHERE \"country\"='bolivia' AND \"lane\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" text\n);\n\nQuestion: In heat rank 7, what is the sum of lanes?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"heats\" WHERE \"heat_rank\"=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_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" text\n);\n\nQuestion: Which country is ranked 56 overall and has a heat rank smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"heats\" WHERE \"heat_rank\"<8 AND \"overall_rank\"='56';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" text\n);\n\nQuestion: What is the greatest lane with an overall rank of 79 and a time larger than 26.1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"heats\" WHERE \"overall_rank\"='79' AND \"time\">26.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: Tell me the highest week for metropolitan stadium for attendance more than 47,644"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"venue\"='metropolitan stadium' AND \"attendance\">'47,644';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"coaches\" (\n \"manager\" text,\n \"period\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" text\n);\n\nQuestion: Name the sum of played for serik berdalin and drawn more than 4"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"coaches\" WHERE \"manager\"='serik berdalin' AND \"drawn\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"party\" text,\n \"pr_seats\" real,\n \"district_seats\" real,\n \"total_elected_2001\" text,\n \"total_seats\" real\n);\n\nQuestion: Who had the highest total PR seats of 48 with a District seat larger than than 73?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_seats\") FROM \"results\" WHERE \"pr_seats\"=48 AND \"district_seats\">73;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"since_1945\" (\n \"candidate\" text,\n \"party\" text,\n \"constituency\" text,\n \"year\" text,\n \"days\" text\n);\n\nQuestion: In 1955 which party did Thomas Mitchell belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"since_1945\" WHERE \"year\"='1955' AND \"candidate\"='thomas mitchell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"since_1945\" (\n \"candidate\" text,\n \"party\" text,\n \"constituency\" text,\n \"year\" text,\n \"days\" text\n);\n\nQuestion: What are the number of days did the ulster unionist Party have the constituate fermanagh and south tyrone?"
},
{
"role": "assistant",
"content": "SELECT \"days\" FROM \"since_1945\" WHERE \"party\"='ulster unionist' AND \"constituency\"='fermanagh and south tyrone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"since_1945\" (\n \"candidate\" text,\n \"party\" text,\n \"constituency\" text,\n \"year\" text,\n \"days\" text\n);\n\nQuestion: What are the number of days in 1945 where the constituent was heywood and radcliffe?"
},
{
"role": "assistant",
"content": "SELECT \"days\" FROM \"since_1945\" WHERE \"year\"='1945' AND \"constituency\"='heywood and radcliffe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"since_1945\" (\n \"candidate\" text,\n \"party\" text,\n \"constituency\" text,\n \"year\" text,\n \"days\" text\n);\n\nQuestion: What year was Hazel Grove the constituent for the liberal party?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"since_1945\" WHERE \"party\"='liberal' AND \"constituency\"='hazel grove';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the average Laps for grid larger than 12 and bikes of ducati 999rs for dean ellison"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"grid\">12 AND \"bike\"='ducati 999rs' AND \"rider\"='dean ellison';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the highest Laps for grid less than 22 and riderS of ruben xaus"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"grid\"<22 AND \"rider\"='ruben xaus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the total number of grid for rider of james toseland"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"rider\"='james toseland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the least Laps for grid larger than 2 with 35:26.734"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"time\"='35:26.734' AND \"grid\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Tell me the date with week of 13"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Tell me the average week for attendance of 48,113"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"attendance\"='48,113';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"albums\" (\n \"year\" real,\n \"album\" text,\n \"song\" text,\n \"label\" text,\n \"catalognum\" text,\n \"format\" text,\n \"country\" text\n);\n\nQuestion: Which Album had a year less than 2005 with a Label by Ministry of Sound?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"albums\" WHERE \"year\"<2005 AND \"label\"='ministry of sound';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"albums\" (\n \"year\" real,\n \"album\" text,\n \"song\" text,\n \"label\" text,\n \"catalognum\" text,\n \"format\" text,\n \"country\" text\n);\n\nQuestion: Which Album had a bigger year than 2005 and whose country was Australia?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"albums\" WHERE \"year\">2005 AND \"country\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"albums\" (\n \"year\" real,\n \"album\" text,\n \"song\" text,\n \"label\" text,\n \"catalognum\" text,\n \"format\" text,\n \"country\" text\n);\n\nQuestion: Which song had Central Station as a label and whose album was Various - Wild Nights 4?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"albums\" WHERE \"label\"='central station' AND \"album\"='various - wild nights 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in_a_match\" (\n \"sixes\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Where did Zimbabwe play?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"in_a_match\" WHERE \"opponent\"='zimbabwe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in_a_match\" (\n \"sixes\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the date when Canada played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"in_a_match\" WHERE \"opponent\"='canada';"
}
] |
[
{
"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: Tell me the lowest silver for rank of 9 and bronze less than 2"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"rank\"=9 AND \"bronze\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the report for raymond sommer"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"non_championship_grands_prix\" WHERE \"winning_driver\"='raymond sommer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the winning driver for monaco grand prix"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"non_championship_grands_prix\" WHERE \"name\"='monaco grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the circuit for marcel lehoux"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"non_championship_grands_prix\" WHERE \"winning_driver\"='marcel lehoux';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the report for per-viktor widengren and alfa romeo"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"non_championship_grands_prix\" WHERE \"winning_driver\"='per-viktor widengren' AND \"winning_constructor\"='alfa romeo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1925_1929\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Tell me the date for warsaw 1929"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1925_1929\" WHERE \"location\"='warsaw' AND \"year\"=1929;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1925_1929\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Tell me the result for warsaw 1929"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"1925_1929\" WHERE \"location\"='warsaw' AND \"year\"=1929;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1925_1929\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Tell me the result for harrogate"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"1925_1929\" WHERE \"location\"='harrogate';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honorifics\" (\n \"stem_meaning\" text,\n \"2nd_person_sg\" text,\n \"2nd_person_sg_honorific\" text,\n \"3rd_person_sg\" text,\n \"3rd_person_sg_honorific\" text\n);\n\nQuestion: Tell me the Stem Meaning of ical"
},
{
"role": "assistant",
"content": "SELECT \"stem_meaning\" FROM \"honorifics\" WHERE \"3rd_person_sg\"='ical';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honorifics\" (\n \"stem_meaning\" text,\n \"2nd_person_sg\" text,\n \"2nd_person_sg_honorific\" text,\n \"3rd_person_sg\" text,\n \"3rd_person_sg_honorific\" text\n);\n\nQuestion: Tell me the 3rd person sg for tiecal, tiecaltzi"
},
{
"role": "assistant",
"content": "SELECT \"3rd_person_sg\" FROM \"honorifics\" WHERE \"3rd_person_sg_honorific\"='tiecal, tiecaltzi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat_rank\" real,\n \"lane\" real,\n \"swimmer\" text,\n \"country\" text,\n \"time\" real,\n \"overall_rank\" text\n);\n\nQuestion: Tell me the overall rank for roland schoeman"
},
{
"role": "assistant",
"content": "SELECT \"overall_rank\" FROM \"heats\" WHERE \"swimmer\"='roland schoeman';"
}
] |
[
{
"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: How many Silver medals did nation who is ranked greater than 1 and has 4 Gold medals have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"rank\">1 AND \"gold\"=4;"
}
] |
[
{
"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: Which nation has more than 6 Silver medals and fewer than 8 Gold medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"silver\">6 AND \"gold\"<8;"
}
] |
[
{
"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 rank of the Nation that has fewer than 24 total medals are more than 7 Gold medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"medal_table\" WHERE \"total\"<24 AND \"gold\">7;"
}
] |
[
{
"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 rank of the nation that has more than 1 Bronze medals and fewer than 4 Gold medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"gold\"<4;"
}
] |
[
{
"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: How many silver medals does Belarus (blr) along with 4 gold and 4 bronze?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"gold\"=4 AND \"nation\"='belarus (blr)' AND \"bronze\">4;"
}
] |
[
{
"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 rank is Belarus (BLR), which earned 15 medals total?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"medal_table\" WHERE \"nation\"='belarus (blr)' AND \"total\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandes_preuves\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the name of the race on 24 September?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"grandes_preuves\" WHERE \"date\"='24 september';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandes_preuves\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the name of the race on 9 July?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"grandes_preuves\" WHERE \"date\"='9 july';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandes_preuves\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the race that was won by a Maserati being driven by Giuseppe Campari?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"grandes_preuves\" WHERE \"winning_constructor\"='maserati' AND \"winning_drivers\"='giuseppe campari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandes_preuves\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What date was the race won by Louis Chiron?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"grandes_preuves\" WHERE \"winning_drivers\"='louis chiron';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandes_preuves\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What brand of vehicle won a race driven by Tazio Nuvolari?"
},
{
"role": "assistant",
"content": "SELECT \"winning_constructor\" FROM \"grandes_preuves\" WHERE \"winning_drivers\"='tazio nuvolari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandes_preuves\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What race was won by Tazio Nuvolari?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"grandes_preuves\" WHERE \"winning_drivers\"='tazio nuvolari';"
}
] |
[
{
"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: Tell me the result for week less than 4 and september 7, 1986"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<4 AND \"date\"='september 7, 1986';"
}
] |
[
{
"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: Tell me the result for week of 3"
},
{
"role": "assistant",
"content": "SELECT \"result\" 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 \"attendance\" real\n);\n\nQuestion: Tell me the lowest week for attedance less thaan 32,738"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"<'32,738';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_served_in_by_richard_bolitho\" (\n \"ship\" text,\n \"guns\" text,\n \"class\" text,\n \"captain\" text,\n \"rank\" text,\n \"year\" text\n);\n\nQuestion: Tell me the ship for lieutenant montagu verling"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"ships_served_in_by_richard_bolitho\" WHERE \"captain\"='lieutenant montagu verling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_served_in_by_richard_bolitho\" (\n \"ship\" text,\n \"guns\" text,\n \"class\" text,\n \"captain\" text,\n \"rank\" text,\n \"year\" text\n);\n\nQuestion: Tell me the class for admiral and hms frobisher"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"ships_served_in_by_richard_bolitho\" WHERE \"rank\"='admiral' AND \"ship\"='hms frobisher';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_served_in_by_richard_bolitho\" (\n \"ship\" text,\n \"guns\" text,\n \"class\" text,\n \"captain\" text,\n \"rank\" text,\n \"year\" text\n);\n\nQuestion: Tell me the guns for third-rate ship of the line and rank of vice-admiral with year of 1802"
},
{
"role": "assistant",
"content": "SELECT \"guns\" FROM \"ships_served_in_by_richard_bolitho\" WHERE \"class\"='third-rate ship of the line' AND \"rank\"='vice-admiral' AND \"year\"='1802';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_served_in_by_richard_bolitho\" (\n \"ship\" text,\n \"guns\" text,\n \"class\" text,\n \"captain\" text,\n \"rank\" text,\n \"year\" text\n);\n\nQuestion: Tell me the captain for 1774 and guns of 14"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"ships_served_in_by_richard_bolitho\" WHERE \"year\"='1774' AND \"guns\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_served_in_by_richard_bolitho\" (\n \"ship\" text,\n \"guns\" text,\n \"class\" text,\n \"captain\" text,\n \"rank\" text,\n \"year\" text\n);\n\nQuestion: Tell me the captain for guns of 28"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"ships_served_in_by_richard_bolitho\" WHERE \"guns\"='28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"star_struck_standing\" (\n \"week_num\" real,\n \"finalists\" text,\n \"status\" text,\n \"eliminated\" text,\n \"date\" text\n);\n\nQuestion: Tell me the status of eliminated of anton dela paz"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"star_struck_standing\" WHERE \"eliminated\"='anton dela paz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"star_struck_standing\" (\n \"week_num\" real,\n \"finalists\" text,\n \"status\" text,\n \"eliminated\" text,\n \"date\" text\n);\n\nQuestion: Tell me the finalists for week # less than 2"
},
{
"role": "assistant",
"content": "SELECT \"finalists\" FROM \"star_struck_standing\" WHERE \"week_num\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"star_struck_standing\" (\n \"week_num\" real,\n \"finalists\" text,\n \"status\" text,\n \"eliminated\" text,\n \"date\" text\n);\n\nQuestion: Tell me the eliminated for week # larger than 4"
},
{
"role": "assistant",
"content": "SELECT \"eliminated\" FROM \"star_struck_standing\" WHERE \"week_num\">4;"
}
] |
[
{
"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: At the UFC 78, what is the average round when the time is 5:00?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"event\"='ufc 78';"
}
] |
[
{
"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: When there was a draw, what was the time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='draw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gp2_series\" (\n \"year\" real,\n \"drivers\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_l\" real,\n \"points\" real,\n \"d_c\" text,\n \"t_c\" text\n);\n\nQuestion: What is the sum of points in 2010 when the driver had more than 14 races and an F.L. of less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"gp2_series\" WHERE \"year\"=2010 AND \"races\">14 AND \"f_l\"<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 day was the game that had an attendance of more than 46,551 people and had a week number of less than 4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\">'46,551' AND \"week\"<4;"
}
] |
[
{
"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 outcome of the game that had a week number of less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<2;"
}
] |
[
{
"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_lane\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What heat and what lane is thi hue pham in?"
},
{
"role": "assistant",
"content": "SELECT \"heat_lane\" FROM \"heats\" WHERE \"name\"='thi hue pham';"
}
] |
[
{
"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_lane\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What Heat & Lane is the person who has a time of 1:01.12?"
},
{
"role": "assistant",
"content": "SELECT \"heat_lane\" FROM \"heats\" WHERE \"time\"='1:01.12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps did Fernando Alonso do?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race\" WHERE \"driver\"='fernando alonso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was Jenson Button's constructor?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='jenson button';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supported_microcontrollers_according_to_\" (\n \"chip\" text,\n \"flash_size\" text,\n \"eeprom\" real,\n \"sram\" real,\n \"frequency_m_hz\" real,\n \"package\" text\n);\n\nQuestion: Tell me the package for EEPROM less than 128"
},
{
"role": "assistant",
"content": "SELECT \"package\" FROM \"supported_microcontrollers_according_to_\" WHERE \"eeprom\"<128;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supported_microcontrollers_according_to_\" (\n \"chip\" text,\n \"flash_size\" text,\n \"eeprom\" real,\n \"sram\" real,\n \"frequency_m_hz\" real,\n \"package\" text\n);\n\nQuestion: Tell me the chip with frequency larger than 10"
},
{
"role": "assistant",
"content": "SELECT \"chip\" FROM \"supported_microcontrollers_according_to_\" WHERE \"frequency_m_hz\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want the highest Grid for Toyota and jarno trulli"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"constructor\"='toyota' AND \"driver\"='jarno trulli';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.