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 \"waitaki_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the total roll with a decile less than 7, and an authority of state, in the Macraes Flat area?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"roll\") FROM \"waitaki_district\" WHERE \"decile\"=7 AND \"authority\"='state' AND \"area\"='macraes flat';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"waitaki_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What year has a decile more than 6, in the Waikouaiti area?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"waitaki_district\" WHERE \"decile\">6 AND \"area\"='waikouaiti';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indoor\" (\n \"year\" text,\n \"division\" text,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: What place did the Nashville Metros place in the 1994/95 Season?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season\" FROM \"indoor\" WHERE \"year\"='1994/95';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indoor\" (\n \"year\" text,\n \"division\" text,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: What years did the Nashville Metros have Usisl Indoor League?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"indoor\" WHERE \"league\"='usisl indoor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_4_4\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which Round has kim eun-ha as an Opponent?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"singles_4_4\" WHERE \"opponent\"='kim eun-ha';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_4_4\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which kind of Edition that has a Surface of clay, and Park Sung-Hee as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"edition\" FROM \"singles_4_4\" WHERE \"surface\"='clay' AND \"opponent\"='park sung-hee';"
}
]
|
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest gold number count where a county had over 9 golds and 10 silvers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"total\">9 AND \"silver\">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\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals did the country with 7 medals and over 5 silver medals receive?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"total\"=7 AND \"silver\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_africa_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the date for venue of lord's"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"south_africa_in_england\" WHERE \"venue\"='lord''s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_africa_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the result for venue of lord's"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"south_africa_in_england\" WHERE \"venue\"='lord''s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_africa_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the date for result of eng by 23 runs"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"south_africa_in_england\" WHERE \"result\"='eng by 23 runs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_africa_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Name the date for result of draw, and venue of edgbaston"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"south_africa_in_england\" WHERE \"result\"='draw' AND \"venue\"='edgbaston';"
}
]
|
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total number of weeks that the Seahawks had a record of 5-5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"record\"='5-5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_record\" (\n \"name\" text,\n \"period\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: Who has 1 win, 1 loss, and has played 2 matches?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"match_record\" WHERE \"wins\"='1' AND \"losses\"='1' AND \"matches\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_record\" (\n \"name\" text,\n \"period\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: Who has 5 losses and has played 11 matches?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"match_record\" WHERE \"losses\"='5' AND \"matches\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_record\" (\n \"name\" text,\n \"period\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: How many matches has Mohammad Al-Shamlan played when there is 1 win?"
},
{
"role": "assistant",
"content": "SELECT \"matches\" FROM \"match_record\" WHERE \"wins\"='1' AND \"name\"='mohammad al-shamlan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_record\" (\n \"name\" text,\n \"period\" text,\n \"matches\" text,\n \"wins\" text,\n \"draws\" text,\n \"losses\" text\n);\n\nQuestion: How many matches were played when there was 1 draw and 1 win?"
},
{
"role": "assistant",
"content": "SELECT \"matches\" FROM \"match_record\" WHERE \"draws\"='1' AND \"wins\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the played with lost of 5"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2010_2011_table\" WHERE \"lost\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the played with points against of points against"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2010_2011_table\" WHERE \"points_against\"='points against';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the tries with tries against of 38"
},
{
"role": "assistant",
"content": "SELECT \"tries_for\" FROM \"2010_2011_table\" WHERE \"tries_against\"='38';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the points against when tries against is 51 and points is 52 with played of 22"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2010_2011_table\" WHERE \"played\"='22' AND \"points\"='52' AND \"tries_against\"='51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the points against for cwmllynfell rfc"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2010_2011_table\" WHERE \"club\"='cwmllynfell rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"176_seats_needed_for_a_majority\" (\n \"polling_firm\" text,\n \"date\" text,\n \"link\" text,\n \"psoe\" text,\n \"others\" text,\n \"lead\" text\n);\n\nQuestion: What is lead for the Election Results polling firm and has a PSOE of 39.6% 175?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"176_seats_needed_for_a_majority\" WHERE \"polling_firm\"='election results' AND \"psoe\"='39.6% 175';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"176_seats_needed_for_a_majority\" (\n \"polling_firm\" text,\n \"date\" text,\n \"link\" text,\n \"psoe\" text,\n \"others\" text,\n \"lead\" text\n);\n\nQuestion: What is the PSOE for the Local Elections polling firm?"
},
{
"role": "assistant",
"content": "SELECT \"psoe\" FROM \"176_seats_needed_for_a_majority\" WHERE \"polling_firm\"='local elections';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"176_seats_needed_for_a_majority\" (\n \"polling_firm\" text,\n \"date\" text,\n \"link\" text,\n \"psoe\" text,\n \"others\" text,\n \"lead\" text\n);\n\nQuestion: Which date has a PSOE of 36.1%?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"176_seats_needed_for_a_majority\" WHERE \"psoe\"='36.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: Name the height with 9 floors"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: Name the years as tallest when floors are larger than 18"
},
{
"role": "assistant",
"content": "SELECT \"years_as_tallest\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: Tell me the name that has 17 floors"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which was the position for overall less than 254, round less than 5 and pick number less than 13?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"indianapolis_colts_draft_history\" WHERE \"overall\"<254 AND \"round\"<5 AND \"pick_num\"<13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the round having an overall of 6"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"indianapolis_colts_draft_history\" WHERE \"overall\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the position of the player from college of virginia"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"indianapolis_colts_draft_history\" WHERE \"college\"='virginia';"
}
]
|
[
{
"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: What was the date of the game that had a goal of 3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"goal\"=3;"
}
]
|
[
{
"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: What was the date of the game that had a goal of 4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"goal\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_barclays\" (\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"points\" real,\n \"winnings\" real\n);\n\nQuestion: If the points are over 1,613 and a To par under -14, what is the overall score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"the_barclays\" WHERE \"points\">'1,613' AND \"to_par\"<-14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest rank of a swimmer in lane 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"semifinal_2\" WHERE \"lane\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the lowest rank of Jens Kruppa in a lane larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='jens kruppa' AND \"lane\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which nationality has a lane of 6 and a rank smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"rank\"<6 AND \"lane\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is Tony Jacklin's total?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"missed_the_cut\" WHERE \"player\"='tony jacklin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What was Todd Hamilton's to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"missed_the_cut\" WHERE \"player\"='todd hamilton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: When was a game won with more than 11 to par?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"to_par\">11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rjfm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location\" text\n);\n\nQuestion: Where is the place that has a Callsign of DWRJ-FM?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"rjfm_stations\" WHERE \"callsign\"='dwrj-fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rjfm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location\" text\n);\n\nQuestion: Which Power has Location in metro manila"
},
{
"role": "assistant",
"content": "SELECT \"power_k_w\" FROM \"rjfm_stations\" WHERE \"location\"='metro manila';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"tier\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tier of the tournament has Mont de Marson in it?"
},
{
"role": "assistant",
"content": "SELECT \"tier\" FROM \"doubles_5\" WHERE \"tournament\"='mont de marson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"tier\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which date has opponents, Akgul Amanmuradova Nina Bratchikova, in the final?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_5\" WHERE \"opponents_in_the_final\"='akgul amanmuradova nina bratchikova';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"tier\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which date has opponents, Claire De Gubernatis Alexandra Dulgheru, in the final?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_5\" WHERE \"opponents_in_the_final\"='claire de gubernatis alexandra dulgheru';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"tier\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the score in the touranament of Antalya-Belek?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_5\" WHERE \"tournament\"='antalya-belek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"tier\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which date has the tier of Itf $10k?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_5\" WHERE \"tier\"='itf $10k';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"as_of_september_1_2012\" text,\n \"vs_protoss\" text,\n \"vs_terran\" text,\n \"vs_zerg\" text,\n \"vs_all\" text\n);\n\nQuestion: What is the value vs. Zerg with a September 1, 2012 best streak?"
},
{
"role": "assistant",
"content": "SELECT \"vs_zerg\" FROM \"statistics\" WHERE \"as_of_september_1_2012\"='best streak';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"as_of_september_1_2012\" text,\n \"vs_protoss\" text,\n \"vs_terran\" text,\n \"vs_zerg\" text,\n \"vs_all\" text\n);\n\nQuestion: What is the score vs. all when the score vs. Terran is 159?"
},
{
"role": "assistant",
"content": "SELECT \"vs_all\" FROM \"statistics\" WHERE \"vs_terran\"='159';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"as_of_september_1_2012\" text,\n \"vs_protoss\" text,\n \"vs_terran\" text,\n \"vs_zerg\" text,\n \"vs_all\" text\n);\n\nQuestion: What is the score vs. Protoss when the score vs. Terran is 10 wins?"
},
{
"role": "assistant",
"content": "SELECT \"vs_protoss\" FROM \"statistics\" WHERE \"vs_terran\"='10 wins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"as_of_september_1_2012\" text,\n \"vs_protoss\" text,\n \"vs_terran\" text,\n \"vs_zerg\" text,\n \"vs_all\" text\n);\n\nQuestion: What is the score vs. Zerg with wins as of September 1,2012?"
},
{
"role": "assistant",
"content": "SELECT \"vs_zerg\" FROM \"statistics\" WHERE \"as_of_september_1_2012\"='wins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"as_of_september_1_2012\" text,\n \"vs_protoss\" text,\n \"vs_terran\" text,\n \"vs_zerg\" text,\n \"vs_all\" text\n);\n\nQuestion: What is the score vs. Terran when the score vs. Zerg is 69?"
},
{
"role": "assistant",
"content": "SELECT \"vs_terran\" FROM \"statistics\" WHERE \"vs_zerg\"='69';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"as_of_september_1_2012\" text,\n \"vs_protoss\" text,\n \"vs_terran\" text,\n \"vs_zerg\" text,\n \"vs_all\" text\n);\n\nQuestion: What occurrs as of September 1, 2012 when the value for vs. all is 65.47%?"
},
{
"role": "assistant",
"content": "SELECT \"as_of_september_1_2012\" FROM \"statistics\" WHERE \"vs_all\"='65.47%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the opponent that has a bye?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"opponent\"='bye';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_concert_world_clas\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: What was the average total medals received by Roland Hayes School when there were 0 gold medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_medals\") FROM \"percussion_scholastic_concert_world_clas\" WHERE \"gold_medals\"=0 AND \"ensemble\"='roland hayes school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_concert_world_clas\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: What was the total number of medals received by James Logan High School when it received less than 1 silver medal?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_medals\") FROM \"percussion_scholastic_concert_world_clas\" WHERE \"ensemble\"='james logan high school' AND \"silver_medals\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"percussion_scholastic_concert_world_clas\" (\n \"ensemble\" text,\n \"gold_medals\" real,\n \"silver_medals\" real,\n \"bronze_medals\" real,\n \"total_medals\" real\n);\n\nQuestion: What is the highest number of bronze medals received by an ensemble who received fewer than 0 gold medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze_medals\") FROM \"percussion_scholastic_concert_world_clas\" WHERE \"gold_medals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Score of the 2008 Africa Cup of Nations Competition?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2008 africa cup of nations';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the most goals with losses less than 15 and position more than 8 with points of 42+4"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_for\") FROM \"final_table\" WHERE \"losses\"<15 AND \"position\">8 AND \"points\"='42+4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the average goals against for draws of 8 and wins more than 22 with losses less than 12"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_against\") FROM \"final_table\" WHERE \"draws\"=8 AND \"losses\"<12 AND \"wins\">22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the least wins for goal difference being less than -20 with position less than 20 and goals for of 35"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"final_table\" WHERE \"position\"<20 AND \"goals_for\"=35 AND \"goal_difference\"<-20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the average losses for draws larger than 6 and played more than 38"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"final_table\" WHERE \"draws\">6 AND \"played\">38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the least goals against for played more than 38"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_against\") FROM \"final_table\" WHERE \"played\">38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: After 1961, who as the Entrant when the engine was a Ferrari v8, and when the points were lower than 23?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"year\">1961 AND \"engine\"='ferrari v8' AND \"points\"<23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is was the Chassis in 1967?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"year\"=1967;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: In 1962, what was the total number of points, when the Engine was Ferrari v6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_results\" WHERE \"engine\"='ferrari v6' AND \"year\"=1962;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: In 1961, what was the Chassis when the points were lower than 6?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"points\"<6 AND \"year\"=1961;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the sum of the years, when the entrant was Scuderia Ferrari, and when the Chassis was Ferrari 312/66?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='scuderia ferrari' AND \"chassis\"='ferrari 312/66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the sum of the years, when the entrant was Scuderia Centro Sud, and when there were 6 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='scuderia centro sud' AND \"points\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"palmerston_north_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" text\n);\n\nQuestion: In the tkkm o manawatu coed school in kelvin grove, what is the Authority listed/"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"palmerston_north_city\" WHERE \"gender\"='coed' AND \"area\"='kelvin grove' AND \"name\"='tkkm o manawatu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"palmerston_north_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" text\n);\n\nQuestion: which Authority has a coed school with a decile greater than 4, with a 150 roll?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"palmerston_north_city\" WHERE \"gender\"='coed' AND \"decile\">4 AND \"roll\"='150';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: Name the language for trotta"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"references\" WHERE \"original_title\"='trotta';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: Name the original title directed by luis bu\u00f1uel"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"references\" WHERE \"director\"='luis bu\u00f1uel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: Name the original title directed by sudhendu roy"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"references\" WHERE \"director\"='sudhendu roy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: Name the film title that is spanish from peru"
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"references\" WHERE \"language\"='spanish' AND \"country\"='peru';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"country\" text,\n \"film_title_used_in_nomination\" text,\n \"language\" text,\n \"original_title\" text,\n \"director\" text\n);\n\nQuestion: Name the langauge for switzerland"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"references\" WHERE \"country\"='switzerland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Total with 0 Silver and Gold, 1 Bronze and Rank larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"performances_by_nation\" WHERE \"rank\">2 AND \"bronze\"=1 AND \"silver\">0 AND \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Bronze medals were received by the nation that Ranked less than 5 and received more than 2 Gold medals, less than 4 Silver medals with a Total of 9 medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"performances_by_nation\" WHERE \"rank\"<5 AND \"gold\">2 AND \"total\"=9 AND \"silver\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chiroptera\" (\n \"name\" text,\n \"species_authority\" text,\n \"order\" text,\n \"family\" text,\n \"red_list\" real\n);\n\nQuestion: which order of bat belongs to the family of vespertilionidae and includes the northern long-eared myotis?"
},
{
"role": "assistant",
"content": "SELECT \"order\" FROM \"chiroptera\" WHERE \"family\"='vespertilionidae' AND \"name\"='northern long-eared myotis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What year has WSC class?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"24_hours_of_le_mans_results\" WHERE \"class\"='wsc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_97_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Which race has D. Beadman for the jockey and a 4th place result?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"1996_97_season_as_a_four_year_old\" WHERE \"jockey\"='d. beadman' AND \"result\"='4th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the 1st party with Charles Isaac Elton as the 2nd member?"
},
{
"role": "assistant",
"content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"2nd_member\"='charles isaac elton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which election had Sir Alexander Fuller-Acland-Hood, bt as the 2nd member?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"2nd_member\"='sir alexander fuller-acland-hood, bt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Who is the 2nd member of the conservative 1st party, which had Vaughan Lee as the 1st member, in the election of 1874?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"members_of_parliament\" WHERE \"1st_party\"='conservative' AND \"1st_member\"='vaughan lee' AND \"election\"='1874';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the 2nd party for a conservative 1st party with a 1st member Charles Moody in the election of 1851 by-election?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_party\" FROM \"members_of_parliament\" WHERE \"1st_party\"='conservative' AND \"1st_member\"='charles moody' AND \"election\"='1851 by-election';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Who is the 1st member in the 1884 by-election?"
},
{
"role": "assistant",
"content": "SELECT \"1st_member\" FROM \"members_of_parliament\" WHERE \"election\"='1884 by-election';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the 2nd party in the 1874 election?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_party\" FROM \"members_of_parliament\" WHERE \"election\"='1874';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january_secondary_phase\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: Which school had a player who played the C position?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"january_secondary_phase\" WHERE \"position\"='c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Which game is on the date October 16?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"summary\" WHERE \"date\"='october 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2009 value with a q1 in 2006 in the French Open?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2006\"='q1' AND \"tournament\"='french open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2010 value with a 2r in 2008 and A in 2013?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2008\"='2r' AND \"2013\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2007 value with 1r in 2009 in the US Open?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"singles_performance_timeline\" WHERE \"2009\"='1r' AND \"tournament\"='us open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2009 value in the 2011 Grand Slam Tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2011\"='grand slam tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2005 value with 1r in 2013 and q2 in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"singles_performance_timeline\" WHERE \"2013\"='1r' AND \"2011\"='q2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2010 value in the Australian Open?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='australian open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"low_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: what is the city of license for the station with the frequency mhz less than 102.3 abd erp w of 25?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"low_power_translators\" WHERE \"frequency_m_hz\"<102.3 AND \"erp_w\"=25;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"low_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: \\What is the class of the station with the call sign w254ah?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"low_power_translators\" WHERE \"call_sign\"='w254ah';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"low_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: what is the class of the station with erp w more than 30?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"low_power_translators\" WHERE \"erp_w\">30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"low_power_translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: what is the highest frequency mhz with the call sign w292cu?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"frequency_m_hz\") FROM \"low_power_translators\" WHERE \"call_sign\"='w292cu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which constructor makes the ej15 ej15b chassis?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='ej15 ej15b';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.