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 \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"result\" text,\n \"site\" text,\n \"series\" text\n);\n\nQuestion: Name the series with game of game 6"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"nba_finals\" WHERE \"game\"='game 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location attendance from Dwyane Wade (27) high points?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"high_points\"='dwyane wade (27)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the high assists from a high points of dorell wright (20)?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"high_points\"='dorell wright (20)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the high rebounds from the date of April 14?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='april 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"retired\" (\n \"make_model\" text,\n \"length\" text,\n \"year\" real,\n \"numbers_quantity_ordered\" text,\n \"fuel_propulsion\" text,\n \"year_retired\" text\n);\n\nQuestion: For the year 1975, what is Propulsion, with a Number (quantity ordered) of 4756-4788 (33 buses)?"
},
{
"role": "assistant",
"content": "SELECT \"fuel_propulsion\" FROM \"retired\" WHERE \"year\"=1975 AND \"numbers_quantity_ordered\"='4756-4788 (33 buses)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"retired\" (\n \"make_model\" text,\n \"length\" text,\n \"year\" real,\n \"numbers_quantity_ordered\" text,\n \"fuel_propulsion\" text,\n \"year_retired\" text\n);\n\nQuestion: What is the make and model that retires in 2004, and has a numbers (quantity ordered) of 961-967 (7 buses)?"
},
{
"role": "assistant",
"content": "SELECT \"make_model\" FROM \"retired\" WHERE \"year_retired\"='2004' AND \"numbers_quantity_ordered\"='961-967 (7 buses)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"retired\" (\n \"make_model\" text,\n \"length\" text,\n \"year\" real,\n \"numbers_quantity_ordered\" text,\n \"fuel_propulsion\" text,\n \"year_retired\" text\n);\n\nQuestion: What year was the diesel fuel propulsion, with a length of 40', and numbers (quanity ordered) of 3701-3729 (29 buses), retired?"
},
{
"role": "assistant",
"content": "SELECT \"year_retired\" FROM \"retired\" WHERE \"fuel_propulsion\"='diesel' AND \"length\"='40''' AND \"numbers_quantity_ordered\"='3701-3729 (29 buses)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location attendance of the game with a 27-22 record?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"record\"='27-22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location attendance of the game on February 25?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='february 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What's the largest Fall 08 number when fall 09 is less than 82, fall 06 is 5, and fall 05 is less than 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"fall_08\") FROM \"geography_of_students\" WHERE \"fall_09\"<82 AND \"fall_06\"=5 AND \"fall_05\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What is the mean Fall 09 number where fall 05 is less than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fall_09\") FROM \"geography_of_students\" WHERE \"fall_05\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What is the sum amount of fall 05 when fall 08 is more than 5, fall 06 is more than 7, the state is Maryland, and fall 09 is more than 471?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fall_05\") FROM \"geography_of_students\" WHERE \"fall_08\">5 AND \"fall_06\">7 AND \"states\"='maryland' AND \"fall_09\">471;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"geography_of_students\" (\n \"states\" text,\n \"fall_05\" real,\n \"fall_06\" real,\n \"fall_07\" real,\n \"fall_08\" real,\n \"fall_09\" real\n);\n\nQuestion: What's the smallest fall 05 number when fall 09 is less than 14 and fall 08 is more than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"fall_05\") FROM \"geography_of_students\" WHERE \"fall_09\"<14 AND \"fall_08\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is in the notes for men's speed skating?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"personal_records\" WHERE \"time\"='men''s speed skating';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What's the date when the location is Berlin?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"personal_records\" WHERE \"location\"='berlin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What's the location for men's speed skating?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"personal_records\" WHERE \"distance\"='men''s speed skating';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What's the location when the notes area is notes?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"personal_records\" WHERE \"notes\"='notes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_records\" (\n \"distance\" text,\n \"time\" text,\n \"date\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is the notes left for Berlin?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"personal_records\" WHERE \"location\"='berlin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deepwater\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text\n);\n\nQuestion: Which is located in Angola and entered service in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"deepwater\" WHERE \"location\"='angola' AND \"entered_service\"='1988';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deepwater\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text\n);\n\nQuestion: What type entered service in 2000?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"deepwater\" WHERE \"entered_service\"='2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deepwater\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text\n);\n\nQuestion: What is the water depth of Sedco 702, located in Nigeria?"
},
{
"role": "assistant",
"content": "SELECT \"water_depth\" FROM \"deepwater\" WHERE \"location\"='nigeria' AND \"name\"='sedco 702';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deepwater\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text\n);\n\nQuestion: Which is located in Nigeria?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"deepwater\" WHERE \"location\"='nigeria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deepwater\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text\n);\n\nQuestion: Which type entered service in 1976/1997 and is located in Brazil?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"deepwater\" WHERE \"location\"='brazil' AND \"entered_service\"='1976/1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"deepwater\" (\n \"name\" text,\n \"type\" text,\n \"entered_service\" text,\n \"water_depth\" text,\n \"location\" text\n);\n\nQuestion: Where is Transocean Richardson, a semi entered into service in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"deepwater\" WHERE \"type\"='semi' AND \"entered_service\"='1988' AND \"name\"='transocean richardson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"rank\" real,\n \"name\" text,\n \"attempts\" real,\n \"net_yds\" real,\n \"yds_att\" real,\n \"year\" real\n);\n\nQuestion: What is the total number of Yds/Att where Net Yds was 1818, and Rank was larger than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"yds_att\") FROM \"college_career\" WHERE \"net_yds\"=1818 AND \"rank\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"rank\" real,\n \"name\" text,\n \"attempts\" real,\n \"net_yds\" real,\n \"yds_att\" real,\n \"year\" real\n);\n\nQuestion: What is the lowest Rank when Attempts was 319, and the Year was larger than 2000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"college_career\" WHERE \"attempts\"=319 AND \"year\">2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college_career\" (\n \"rank\" real,\n \"name\" text,\n \"attempts\" real,\n \"net_yds\" real,\n \"yds_att\" real,\n \"year\" real\n);\n\nQuestion: What is the total number of Attempts when Rank was larger than 4, and Net Yds was smaller than 1674?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attempts\") FROM \"college_career\" WHERE \"rank\">4 AND \"net_yds\"<1674;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"team_nickname\" text,\n \"tenure\" text,\n \"new_conference\" text,\n \"new_classification\" text\n);\n\nQuestion: What is the new conference for the Gauchos team?"
},
{
"role": "assistant",
"content": "SELECT \"new_conference\" FROM \"former_members\" WHERE \"team_nickname\"='gauchos';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"team_nickname\" text,\n \"tenure\" text,\n \"new_conference\" text,\n \"new_classification\" text\n);\n\nQuestion: What is the new classification for La Mirada, California?"
},
{
"role": "assistant",
"content": "SELECT \"new_classification\" FROM \"former_members\" WHERE \"location\"='la mirada, california';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"team_nickname\" text,\n \"tenure\" text,\n \"new_conference\" text,\n \"new_classification\" text\n);\n\nQuestion: What is the tenure for the Tritons team?"
},
{
"role": "assistant",
"content": "SELECT \"tenure\" FROM \"former_members\" WHERE \"team_nickname\"='tritons';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which opponent was present on March 28?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"march\"=28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the mean game number when the points scored were more than 99?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"regular_season\" WHERE \"points\">99;"
}
] |
[
{
"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: Who is the opponent in game 7?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"game\"=7;"
}
] |
[
{
"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 day in December was the game before game 11 with a record of 7-2-2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"december\") FROM \"schedule_and_results\" WHERE \"record\"='7-2-2' AND \"game\"<11;"
}
] |
[
{
"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 day in December of the game against the Boston Bruins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"december\") FROM \"schedule_and_results\" WHERE \"opponent\"='boston bruins';"
}
] |
[
{
"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 average day in December of the game with a 8-2-3 record?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"december\") FROM \"schedule_and_results\" WHERE \"record\"='8-2-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"production\" (\n \"system\" text,\n \"owner\" text,\n \"quantity\" real,\n \"delivery\" text,\n \"length\" text,\n \"gauge\" text,\n \"operation\" text,\n \"seats\" real,\n \"standing\" real\n);\n\nQuestion: How many seats have a quantity over 45?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"seats\") FROM \"production\" WHERE \"quantity\">45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"production\" (\n \"system\" text,\n \"owner\" text,\n \"quantity\" real,\n \"delivery\" text,\n \"length\" text,\n \"gauge\" text,\n \"operation\" text,\n \"seats\" real,\n \"standing\" real\n);\n\nQuestion: Which owner has 84 seats?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"production\" WHERE \"seats\"=84;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"production\" (\n \"system\" text,\n \"owner\" text,\n \"quantity\" real,\n \"delivery\" text,\n \"length\" text,\n \"gauge\" text,\n \"operation\" text,\n \"seats\" real,\n \"standing\" real\n);\n\nQuestion: Which deliver has 16 and a standing more than 128?"
},
{
"role": "assistant",
"content": "SELECT \"delivery\" FROM \"production\" WHERE \"quantity\"=16 AND \"standing\">128;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"host_cities\" (\n \"year\" text,\n \"theme\" text,\n \"host_city\" text,\n \"venue\" text,\n \"hosts\" text\n);\n\nQuestion: What is the host city that has Alicia Keys listed as a host?"
},
{
"role": "assistant",
"content": "SELECT \"host_city\" FROM \"host_cities\" WHERE \"hosts\"='alicia keys';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"host_cities\" (\n \"year\" text,\n \"theme\" text,\n \"host_city\" text,\n \"venue\" text,\n \"hosts\" text\n);\n\nQuestion: What is the host city of the Singapore Indoor Stadium venue and a Valentine's Day theme?"
},
{
"role": "assistant",
"content": "SELECT \"host_city\" FROM \"host_cities\" WHERE \"venue\"='singapore indoor stadium' AND \"theme\"='valentine''s day';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"host_cities\" (\n \"year\" text,\n \"theme\" text,\n \"host_city\" text,\n \"venue\" text,\n \"hosts\" text\n);\n\nQuestion: What year will Bangkok be the host city and Alicia Keys host?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"host_cities\" WHERE \"host_city\"='bangkok' AND \"hosts\"='alicia keys';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"host_cities\" (\n \"year\" text,\n \"theme\" text,\n \"host_city\" text,\n \"venue\" text,\n \"hosts\" text\n);\n\nQuestion: Who are the hosts from the event with a theme of codehunters and the host city of Bangkok?"
},
{
"role": "assistant",
"content": "SELECT \"hosts\" FROM \"host_cities\" WHERE \"host_city\"='bangkok' AND \"theme\"='codehunters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"host_cities\" (\n \"year\" text,\n \"theme\" text,\n \"host_city\" text,\n \"venue\" text,\n \"hosts\" text\n);\n\nQuestion: Who are the hosts for the 2004 event?"
},
{
"role": "assistant",
"content": "SELECT \"hosts\" FROM \"host_cities\" WHERE \"year\"='2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What date has a margin of victory of 1 stroke over Greg Kraft?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_10\" WHERE \"margin_of_victory\"='1 stroke' AND \"runner_s_up\"='greg kraft';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory over Steve Rintoul?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_10\" WHERE \"runner_s_up\"='steve rintoul';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory over Brad Faxon?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_10\" WHERE \"runner_s_up\"='brad faxon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displ\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What years show Model of 2.0 tdi (cr) dpf?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"engines\" WHERE \"model\"='2.0 tdi (cr) dpf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displ\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the power for model 2.0 tdi (cr) dpf, and a Years of 2010\u20132011?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"engines\" WHERE \"model\"='2.0 tdi (cr) dpf' AND \"years\"='2010\u20132011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displ\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the torque for Model of 2.0 bitdi (cr) dpf, in 2010\u2013?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"model\"='2.0 bitdi (cr) dpf' AND \"years\"='2010\u2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displ\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the engine for model 2.0 bitdi (cr) dpf, with a Torque of n\u00b7m (lb\u00b7ft) @ 1500\u20132000 rpm?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engines\" WHERE \"model\"='2.0 bitdi (cr) dpf' AND \"torque\"='n\u00b7m (lb\u00b7ft) @ 1500\u20132000 rpm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_daimy\" (\n \"name\" text,\n \"tenure\" text,\n \"courtesy_title\" text,\n \"court_rank\" text,\n \"revenues\" text,\n \"lineage\" text\n);\n\nQuestion: What is the Court Rank of Son of Norihiro's Lineage?"
},
{
"role": "assistant",
"content": "SELECT \"court_rank\" FROM \"list_of_daimy\" WHERE \"lineage\"='son of norihiro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" text,\n \"1801\" text,\n \"1811\" text,\n \"1821\" text,\n \"1841\" text,\n \"1851\" text,\n \"1861\" text,\n \"1871\" text,\n \"1881\" text,\n \"1891\" text,\n \"1901\" text\n);\n\nQuestion: Name the 1811 for 1801 of 1801"
},
{
"role": "assistant",
"content": "SELECT \"1811\" FROM \"demography\" WHERE \"1801\"='1801';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" text,\n \"1801\" text,\n \"1811\" text,\n \"1821\" text,\n \"1841\" text,\n \"1851\" text,\n \"1861\" text,\n \"1871\" text,\n \"1881\" text,\n \"1891\" text,\n \"1901\" text\n);\n\nQuestion: Name the 1861 with 1851 of 5291"
},
{
"role": "assistant",
"content": "SELECT \"1861\" FROM \"demography\" WHERE \"1851\"='5291';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" text,\n \"1801\" text,\n \"1811\" text,\n \"1821\" text,\n \"1841\" text,\n \"1851\" text,\n \"1861\" text,\n \"1871\" text,\n \"1881\" text,\n \"1891\" text,\n \"1901\" text\n);\n\nQuestion: Name the 1901 with 1851 of 1961"
},
{
"role": "assistant",
"content": "SELECT \"1901\" FROM \"demography\" WHERE \"1851\"='1961';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" text,\n \"1801\" text,\n \"1811\" text,\n \"1821\" text,\n \"1841\" text,\n \"1851\" text,\n \"1861\" text,\n \"1871\" text,\n \"1881\" text,\n \"1891\" text,\n \"1901\" text\n);\n\nQuestion: Name the 1821 with 1811 of 1921"
},
{
"role": "assistant",
"content": "SELECT \"1821\" FROM \"demography\" WHERE \"1811\"='1921';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demography\" (\n \"year\" text,\n \"1801\" text,\n \"1811\" text,\n \"1821\" text,\n \"1841\" text,\n \"1851\" text,\n \"1861\" text,\n \"1871\" text,\n \"1881\" text,\n \"1891\" text,\n \"1901\" text\n);\n\nQuestion: Name the 1821 with 1861 of 3733"
},
{
"role": "assistant",
"content": "SELECT \"1821\" FROM \"demography\" WHERE \"1861\"='3733';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What's the sum of Code with a Population that's larger than 1,752, a Most Spoken Language of Xhosa, a Place of Bontrug, and an Area (KM 2) that's larger than 2.33?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"code\") FROM \"main_places\" WHERE \"population\">'1,752' AND \"most_spoken_language\"='xhosa' AND \"place\"='bontrug' AND \"area_km_2\">2.33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What's the sum of the Area (KM 2) that's got a Population that's smaller than 90?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"area_km_2\") FROM \"main_places\" WHERE \"population\"<90;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What's the lowest Code that's got a Most Spoke Language of Xhosa, a Place of Addo Elephant National Park, and an Area (KM 2) that's smaller than 1.08?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"code\") FROM \"main_places\" WHERE \"most_spoken_language\"='xhosa' AND \"place\"='addo elephant national park' AND \"area_km_2\"<1.08;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What is the score at game 31?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the Grid for Rider Ruben Xaus?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"rider\"='ruben xaus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What was the number of Laps with a Grid of more than 3 and Time of 39:24.967?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"superbike_race_1_classification\" WHERE \"grid\">3 AND \"time\"='39:24.967';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What Rider had a Time of +1:08.291?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"superbike_race_1_classification\" WHERE \"time\"='+1:08.291';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Using a Ducati 999 F06 Bike, how many Laps with a Grid greater than 11 and Time of +53.488?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"superbike_race_1_classification\" WHERE \"bike\"='ducati 999 f06' AND \"time\"='+53.488' AND \"grid\">11;"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: When was there a record of 13\u201317\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='13\u201317\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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What record was made in vancouver on December 8?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"home\"='vancouver' AND \"date\"='december 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the home who had California visiting?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"visitor\"='california';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What's the score on December 1 when Philadelphia visited?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"visitor\"='philadelphia' AND \"date\"='december 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1966\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What was the type of game with a 1:6 result?"
},
{
"role": "assistant",
"content": "SELECT \"type_of_game\" FROM \"1966\" WHERE \"results\"='1:6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1966\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: Who was the opponent at the game in Belgrade with a 0:2 result?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"1966\" WHERE \"city\"='belgrade' AND \"results\"='0:2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1966\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What city held the game with a result of 1:0?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1966\" WHERE \"results\"='1:0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1966\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What type of game had a result of 1:2?"
},
{
"role": "assistant",
"content": "SELECT \"type_of_game\" FROM \"1966\" WHERE \"results\"='1:2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1966\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What was the result of the game against Hungary?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"1966\" WHERE \"opponent\"='hungary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Who was the Radio Edit Version remixed by?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"version\"='radio edit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What was the Version prior to 1996?"
},
{
"role": "assistant",
"content": "SELECT \"version\" FROM \"official_versions\" WHERE \"year\"<1996;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Date of Catalog 573 194-2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='573 194-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label of the release in CD Maxi Format?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='cd maxi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"region\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog number of the CD Single?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='cd single';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mountain_dew_250\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Make has a Pos larger than 9?"
},
{
"role": "assistant",
"content": "SELECT \"make\" FROM \"mountain_dew_250\" WHERE \"pos\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mountain_dew_250\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Driver of brian scott (r)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pos\") FROM \"mountain_dew_250\" WHERE \"driver\"='brian scott (r)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mountain_dew_250\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: How many Pos have a Driver of todd bodine, and a Car # larger than 30?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pos\") FROM \"mountain_dew_250\" WHERE \"driver\"='todd bodine' AND \"car_num\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mountain_dew_250\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Car # has a Make of toyota, and a Pos of 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"car_num\") FROM \"mountain_dew_250\" WHERE \"make\"='toyota' AND \"pos\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track_number\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"recording_date\" text,\n \"time\" text\n);\n\nQuestion: How many track numbers were recorded on November 16, 1959 for the title of I Couldn't Hear Nobody Pray?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"track_number\") FROM \"track_listing\" WHERE \"recording_date\"='november 16, 1959' AND \"title\"='i couldn''t hear nobody pray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track_number\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"recording_date\" text,\n \"time\" text\n);\n\nQuestion: On what date was My Lord What a Mornin' recorded?"
},
{
"role": "assistant",
"content": "SELECT \"recording_date\" FROM \"track_listing\" WHERE \"title\"='my lord what a mornin''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track_number\" real,\n \"title\" text,\n \"songwriter_s\" text,\n \"recording_date\" text,\n \"time\" text\n);\n\nQuestion: What is the average track number 3:25 long and a title of Great Getting up Mornin'?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"track_number\") FROM \"track_listing\" WHERE \"time\"='3:25' AND \"title\"='great getting up mornin''';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: WHich Date has a Record of 2\u20137\u20130\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='2\u20137\u20130\u20131';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who is the Visitor on march 16?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"date\"='march 16';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Record is on november 16?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='november 16';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Home on december 10?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"date\"='december 10';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: WHich Score has a Date on november 11?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='november 11';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Date on december 18?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='december 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What visitor has march 26 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"date\"='march 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What visitor has detroit red wings as the home, and march 30 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"home\"='detroit red wings' AND \"date\"='march 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What record has chicago black hawks as the visitor and march 23 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"visitor\"='chicago black hawks' AND \"date\"='march 23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What record has march 30 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"date\"='march 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the unanimous result of the player from Michigan Dartmouth?"
},
{
"role": "assistant",
"content": "SELECT \"unanimous\" FROM \"ncaa_consensus_all_american_team\" WHERE \"school\"='michigan dartmouth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the position of the player with a unanimous no result without a college hall of fame?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"ncaa_consensus_all_american_team\" WHERE \"unanimous\"='no' AND \"college_hall_of_fame\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the school of the player with a college hall of fame nevers hof profile?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"ncaa_consensus_all_american_team\" WHERE \"college_hall_of_fame\"='nevers hof profile';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the school of the player who plays ends?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"ncaa_consensus_all_american_team\" WHERE \"position\"='ends';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.