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 \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What were the notes in Toronto, Canada?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"achievements\" WHERE \"venue\"='toronto, canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: Name the most points for class of 125cc and team of mv agusta with year more than 1957"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='125cc' AND \"team\"='mv agusta' AND \"year\">1957;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titles_by_beyond_software\" (\n \"title\" text,\n \"genre\" text,\n \"c_64\" text,\n \"zx_spectrum\" text,\n \"others\" text,\n \"year\" real,\n \"format\" text\n);\n\nQuestion: Which ZX Spectrum has a Year larger than 1984, and a Genre of arcade/strategy?"
},
{
"role": "assistant",
"content": "SELECT \"zx_spectrum\" FROM \"titles_by_beyond_software\" WHERE \"year\">1984 AND \"genre\"='arcade/strategy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titles_by_beyond_software\" (\n \"title\" text,\n \"genre\" text,\n \"c_64\" text,\n \"zx_spectrum\" text,\n \"others\" text,\n \"year\" real,\n \"format\" text\n);\n\nQuestion: How many years have a Title of kriegspiel?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"titles_by_beyond_software\" WHERE \"title\"='kriegspiel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titles_by_beyond_software\" (\n \"title\" text,\n \"genre\" text,\n \"c_64\" text,\n \"zx_spectrum\" text,\n \"others\" text,\n \"year\" real,\n \"format\" text\n);\n\nQuestion: Which ZX Spectrum has a C=64 of c64, and a Title of ankh?"
},
{
"role": "assistant",
"content": "SELECT \"zx_spectrum\" FROM \"titles_by_beyond_software\" WHERE \"c_64\"='c64' AND \"title\"='ankh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titles_by_beyond_software\" (\n \"title\" text,\n \"genre\" text,\n \"c_64\" text,\n \"zx_spectrum\" text,\n \"others\" text,\n \"year\" real,\n \"format\" text\n);\n\nQuestion: Which Title has Others of amstrad cpc, and a Genre of arcade?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"titles_by_beyond_software\" WHERE \"others\"='amstrad cpc' AND \"genre\"='arcade';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What was the result when the attendance was 12,000?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='12,000';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance for weeks prior to 5 when there was no game scheduled?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<5 AND \"date\"='no game scheduled';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance number for the venue of Lakeside Park?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"venue\"='lakeside park';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What is the largest week number for the venue of League Park for the date of November 25, 1920?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"venue\"='league park' AND \"date\"='november 25, 1920';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: What is Michael's surname?"
},
{
"role": "assistant",
"content": "SELECT \"surname\" FROM \"player_roster\" WHERE \"first\"='michael';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which First has Bats of r, and Throws of l, and a DOB of 12 october 1977?"
},
{
"role": "assistant",
"content": "SELECT \"first\" FROM \"player_roster\" WHERE \"bats\"='r' AND \"throws\"='l' AND \"d_o_b\"='12 october 1977';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: When was Maat born?"
},
{
"role": "assistant",
"content": "SELECT \"d_o_b\" FROM \"player_roster\" WHERE \"surname\"='maat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: How many bats does Todd have?"
},
{
"role": "assistant",
"content": "SELECT \"bats\" FROM \"player_roster\" WHERE \"first\"='todd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which Position has a DOB of 13 may 1987?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"player_roster\" WHERE \"d_o_b\"='13 may 1987';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which Bats have Throws of r, and a DOB of 22 may 1973?"
},
{
"role": "assistant",
"content": "SELECT \"bats\" FROM \"player_roster\" WHERE \"throws\"='r' AND \"d_o_b\"='22 may 1973';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"149\" real,\n \"9_february\" text,\n \"friendly\" text,\n \"israel\" text,\n \"croatia\" text\n);\n\nQuestion: Which Croatia has a Friendly of world cup 2006 qualifier, and a 149 of 152?"
},
{
"role": "assistant",
"content": "SELECT \"croatia\" FROM \"2005\" WHERE \"friendly\"='world cup 2006 qualifier' AND \"149\"=152;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"production_company\" text\n);\n\nQuestion: For which production company did Sam Mccarthy produce?"
},
{
"role": "assistant",
"content": "SELECT \"production_company\" FROM \"2006\" WHERE \"producer_s\"='sam mccarthy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"production_company\" text\n);\n\nQuestion: Who was the director that worked with Dana Dorian as the writer?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2006\" WHERE \"writer_s\"='dana dorian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"producer_s\" text,\n \"writer_s\" text,\n \"production_company\" text\n);\n\nQuestion: Which film, directed by Dana Dorian, was nominated?"
},
{
"role": "assistant",
"content": "SELECT \"film\" FROM \"2006\" WHERE \"rank\"='nominated' AND \"director_s\"='dana dorian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the sum for December against the vancouver canucks earlier than game 33?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"december\") FROM \"schedule_and_results\" WHERE \"opponent\"='vancouver canucks' AND \"game\"<33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the sum for December when the record was 22-12-5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"december\") FROM \"schedule_and_results\" WHERE \"record\"='22-12-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: When is the earliest year associated with team norton and 0 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='norton' AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the year that there were 0 wins, team AJS, and under 12 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\"=0 AND \"team\"='ajs' AND \"points\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year is associated with a drama desk award ceremony and a Category of outstanding featured actress in a musical?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"awards_and_nominations\" WHERE \"award_ceremony\"='drama desk award' AND \"category\"='outstanding featured actress in a musical';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" text\n);\n\nQuestion: What is the average Loss for the long of more than 12 with a name of opponents with a Gain larger than 1751?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"loss\") FROM \"rushing\" WHERE \"long\">12 AND \"name\"='opponents' AND \"gain\">1751;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_02_season_as_a_three_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 \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Who was the winner/2nd place finisher in the Caulfield Guineas?"
},
{
"role": "assistant",
"content": "SELECT \"winner_2nd\" FROM \"2001_02_season_as_a_three_year_old\" WHERE \"race\"='caulfield guineas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_02_season_as_a_three_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 \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Which jockey had a group of G3?"
},
{
"role": "assistant",
"content": "SELECT \"jockey\" FROM \"2001_02_season_as_a_three_year_old\" WHERE \"group\"='g3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_02_season_as_a_three_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 \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the time for the G2 group at the Hobartville Stakes?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"2001_02_season_as_a_three_year_old\" WHERE \"group\"='g2' AND \"race\"='hobartville stakes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"state_territory\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text,\n \"begin\" text\n);\n\nQuestion: Which airport has perth as the city?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"destinations\" WHERE \"city\"='perth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"state_territory\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text,\n \"begin\" text\n);\n\nQuestion: Which city has tasmania as the state/territory and a ICAO of ymhb?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"state_territory\"='tasmania' AND \"icao\"='ymhb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"state_territory\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text,\n \"begin\" text\n);\n\nQuestion: Which airport has an ICAO of ybcg?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"destinations\" WHERE \"icao\"='ybcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"state_territory\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text,\n \"begin\" text\n);\n\nQuestion: What is the IATA that has new south wales as the state/territory beginning on july 2009?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"state_territory\"='new south wales' AND \"begin\"='july 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"state_territory\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text,\n \"begin\" text\n);\n\nQuestion: What IATA has queensland as the state/territory and an ICAO of ybrk?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"state_territory\"='queensland' AND \"icao\"='ybrk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"state_territory\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text,\n \"begin\" text\n);\n\nQuestion: What begin has victoria as the state/territory and a ICA0 of ymml?"
},
{
"role": "assistant",
"content": "SELECT \"begin\" FROM \"destinations\" WHERE \"state_territory\"='victoria' AND \"icao\"='ymml';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visitor on March 27?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"march\" WHERE \"date\"='march 27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record on March 14?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"march\" WHERE \"date\"='march 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"frequency\" text,\n \"name\" text,\n \"format\" text,\n \"call_sign\" text,\n \"covered_location\" text\n);\n\nQuestion: What format is at frequency 99.5 FM?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"fm_stations\" WHERE \"frequency\"='99.5 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"frequency\" text,\n \"name\" text,\n \"format\" text,\n \"call_sign\" text,\n \"covered_location\" text\n);\n\nQuestion: What format has the call sign DZFE?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"fm_stations\" WHERE \"call_sign\"='dzfe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"frequency\" text,\n \"name\" text,\n \"format\" text,\n \"call_sign\" text,\n \"covered_location\" text\n);\n\nQuestion: What covered location has a frequency of 90.7 FM"
},
{
"role": "assistant",
"content": "SELECT \"covered_location\" FROM \"fm_stations\" WHERE \"frequency\"='90.7 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"frequency\" text,\n \"name\" text,\n \"format\" text,\n \"call_sign\" text,\n \"covered_location\" text\n);\n\nQuestion: What is the frequency of 104.3 business radio?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"fm_stations\" WHERE \"name\"='104.3 business radio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"frequency\" text,\n \"name\" text,\n \"format\" text,\n \"call_sign\" text,\n \"covered_location\" text\n);\n\nQuestion: What name has the call sign DWYS?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"fm_stations\" WHERE \"call_sign\"='dwys';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"villages\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Who has a DCSF number of 3373?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"villages\" WHERE \"dcsf_number\"=3373;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"villages\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: What is the average primary intake with an Ofsted number of 117433 and a DCSF number greater than 3335?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"intake\") FROM \"villages\" WHERE \"type\"='primary' AND \"ofsted_number\"=117433 AND \"dcsf_number\">3335;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"villages\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: What is the lowest Ofsted number for a primary with a CE faith, intake of 30 and a DCSF number lower than 3349?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"ofsted_number\") FROM \"villages\" WHERE \"type\"='primary' AND \"faith\"='ce' AND \"intake\"=30 AND \"dcsf_number\"<3349;"
}
] |
[
{
"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: Can you tell me the Opponent that has the Result of w 37-14?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='w 37-14';"
}
] |
[
{
"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: Can you tell me the Opponent that has the Date of october 11, 1953?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='october 11, 1953';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: What year was the West Coast League established than the championships are greater than 0?"
},
{
"role": "assistant",
"content": "SELECT \"established\" FROM \"professional_sports\" WHERE \"championships\">0 AND \"league\"='west coast league';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: During the Apple Bowl having 0 championships, what was the established year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"established\") FROM \"professional_sports\" WHERE \"championships\"=0 AND \"venue\"='apple bowl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: What sport happened at Wildcat Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"professional_sports\" WHERE \"venue\"='wildcat stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: How many championships does Evergreen Premier League have?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"championships\") FROM \"professional_sports\" WHERE \"league\"='evergreen premier league';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_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 Position has a Round larger than 10, and a Name of shawn mccarthy?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"atlanta_falcons_draft_history\" WHERE \"round\">10 AND \"name\"='shawn mccarthy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Pick #s have a Name of tory epps, and a Round larger than 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='tory epps' AND \"round\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which team was the visitor with a record of 5-2-0?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"schedule\" WHERE \"record\"='5-2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the score for the November 3 game?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule\" WHERE \"date\"='november 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"martin\" text,\n \"gr_ne\" text,\n \"others\" text,\n \"undecided\" text\n);\n\nQuestion: What percent of others did ogm/news count when MARTIN had 9%?"
},
{
"role": "assistant",
"content": "SELECT \"others\" FROM \"opinion_polls\" WHERE \"martin\"='9%' AND \"source\"='ogm/news';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"martin\" text,\n \"gr_ne\" text,\n \"others\" text,\n \"undecided\" text\n);\n\nQuestion: What is the Undecided the others was 4%?"
},
{
"role": "assistant",
"content": "SELECT \"undecided\" FROM \"opinion_polls\" WHERE \"others\"='4%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"martin\" text,\n \"gr_ne\" text,\n \"others\" text,\n \"undecided\" text\n);\n\nQuestion: What is the Undecided on 2009-05-24?"
},
{
"role": "assistant",
"content": "SELECT \"undecided\" FROM \"opinion_polls\" WHERE \"date\"='2009-05-24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"martin\" text,\n \"gr_ne\" text,\n \"others\" text,\n \"undecided\" text\n);\n\nQuestion: What is the Date that has MARTIN of 7\u20139% and no Undecided?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"opinion_polls\" WHERE \"undecided\"='\u2013' AND \"martin\"='7\u20139%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"martin\" text,\n \"gr_ne\" text,\n \"others\" text,\n \"undecided\" text\n);\n\nQuestion: What is the Date when MARTIN had 8%?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"opinion_polls\" WHERE \"martin\"='8%';"
}
] |
[
{
"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 Attendance has a Game smaller than 3, and a Date of october 31?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"summary\" WHERE \"game\"<3 AND \"date\"='october 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_figures_in_a_match\" (\n \"rank\" text,\n \"bowling\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is rank of player Charles Eady and a Bowling of 12/63?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"best_figures_in_a_match\" WHERE \"player\"='charles eady' AND \"bowling\"='12/63';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_37_17_20\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the Opponent partnering with Jordan Kerr, on a hard surface that was the winner?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"doubles_37_17_20\" WHERE \"surface\"='hard' AND \"outcome\"='winner' AND \"partnering\"='jordan kerr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"year\" real,\n \"trim\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"epa_2008_city\" text\n);\n\nQuestion: What's the Year Average that has a Power of BHP (KW) and Trim of LS/2LT?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"engines\" WHERE \"power\"='bhp (kw)' AND \"trim\"='ls/2lt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"year\" real,\n \"trim\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"epa_2008_city\" text\n);\n\nQuestion: Which Engine has a Year that's Larger than 2006 and Power of BHP (KW)?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engines\" WHERE \"year\">2006 AND \"power\"='bhp (kw)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"year\" real,\n \"trim\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"epa_2008_city\" text\n);\n\nQuestion: What Torque has a Power of HP (KW)?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"power\"='hp (kw)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"year\" real,\n \"trim\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text,\n \"epa_2008_city\" text\n);\n\nQuestion: What's the Year average that's got Trim of LS/LT and Power of HP (KW)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"engines\" WHERE \"trim\"='ls/lt' AND \"power\"='hp (kw)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_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 college with overall of 17"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_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 least overall for tony baker"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='tony baker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visiting team when Winnipeg was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"home\"='winnipeg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game with a decision of Peeters and a record of 29\u20133\u201311?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"decision\"='peeters' AND \"record\"='29\u20133\u201311';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the Label of Catalogue # HVNLP26CD from United Kingdom?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"country\"='united kingdom' AND \"catalogue_num\"='hvnlp26cd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What Country is Catalogue # ASW 50248 (724385024825) from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"catalogue_num\"='asw 50248 (724385024825)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races\" (\n \"round\" text,\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_car\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Who is the winning team of the South Pacific Trophy?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"races\" WHERE \"name\"='south pacific trophy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Loss of gonz\u00e1lez (0\u20133) had what attendance?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"loss\"='gonz\u00e1lez (0\u20133)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Record of 92\u201370 had what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='92\u201370';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Loss of kendrick (11\u20138) had what record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='kendrick (11\u20138)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Date of september 28 had what record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Attendance of 23,150 had what opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='23,150';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Attendance of 36,796 had what score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\"='36,796';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the sum of Long for derrick locke?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"long\") FROM \"rushing\" WHERE \"name\"='derrick locke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest Loss with Gain larger than 319 for derrick locke?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"loss\") FROM \"rushing\" WHERE \"name\"='derrick locke' AND \"gain\">319;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text,\n \"head_coach\" text\n);\n\nQuestion: Head Coach of wojciech kami\u0144ski is what club?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"overview\" WHERE \"head_coach\"='wojciech kami\u0144ski';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text,\n \"head_coach\" text\n);\n\nQuestion: Sport of football, and a Venue of stadion polonii is what league?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"overview\" WHERE \"sport\"='football' AND \"venue\"='stadion polonii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text,\n \"head_coach\" text\n);\n\nQuestion: Sport of gaelic football and hurling is what league?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"overview\" WHERE \"sport\"='gaelic football and hurling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text,\n \"head_coach\" text\n);\n\nQuestion: Venue of Pepsi arena involved what club?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"overview\" WHERE \"venue\"='pepsi arena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest earnings for Tom watson who had a ranking larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"earnings\") FROM \"leaders\" WHERE \"player\"='tom watson' AND \"rank\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest rank for the player who earns $4,263,133?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"earnings\"='4,263,133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the average number of wins for the player with a rank larger than 3 and earnings of $3,707,586?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"leaders\" WHERE \"rank\">3 AND \"earnings\"='3,707,586';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest number of wins for Tom Watson who earns less than $4,974,845?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"leaders\" WHERE \"player\"='tom watson' AND \"earnings\"<'4,974,845';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest earnings for curtis strange?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"earnings\") FROM \"leaders\" WHERE \"player\"='curtis strange';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: What is the average year with an average start smaller than 6.3 and fewer than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"nascar_nationwide_series\" WHERE \"avg_start\"<6.3 AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Second has a Skip of barbora vojtusova?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"group_b2\" WHERE \"skip\"='barbora vojtusova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Skip did marju velga lead?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"group_b2\" WHERE \"lead\"='marju velga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Lead has a Second of katrin kuusk?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"group_b2\" WHERE \"second\"='katrin kuusk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Third has a Skip of ellen vogt?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"group_b2\" WHERE \"skip\"='ellen vogt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Third has a Second of agnieszka ogrodniczek?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"group_b2\" WHERE \"second\"='agnieszka ogrodniczek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is Spain's skip?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"group_b2\" WHERE \"nation\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vermont_counties_ranked_by_per_capita_in\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the Per capita income associated with over 116,716,292 households and a Median household income of $42,706?"
},
{
"role": "assistant",
"content": "SELECT \"per_capita_income\" FROM \"vermont_counties_ranked_by_per_capita_in\" WHERE \"number_of_households\">'116,716,292' AND \"median_household_income\"='$42,706';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vermont_counties_ranked_by_per_capita_in\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the Per capita income associated with a Median household income of $55,800?"
},
{
"role": "assistant",
"content": "SELECT \"per_capita_income\" FROM \"vermont_counties_ranked_by_per_capita_in\" WHERE \"median_household_income\"='$55,800';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.