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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: WHAT WEEK HAS A TV TIME OF BYE?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"tv_time\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: WHAT WAS THE ATTENDANCE FOR WEEK 15?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: WHAT WAS THE RESULT FOR NOVEMBER 29, 2001?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='november 29, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: In what year was the bridge in Clarkdale built?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"references\" WHERE \"location\"='clarkdale';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: In what year was the Gila Bend Overpass built?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"references\" WHERE \"name\"='gila bend overpass';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: In what county is the Canyon Padre Bridge?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"references\" WHERE \"name\"='canyon padre bridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_teams\" (\n \"teams\" text,\n \"finals_appearances\" real,\n \"championships\" real,\n \"runners_up\" real,\n \"years_won\" text,\n \"years_runners_up\" text\n);\n\nQuestion: Who won the ABA Championship in 1971?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"championships\") FROM \"results_by_teams\" WHERE \"years_won\"='1971';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What was the average amount of losses for teams with played less than 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"first_round\" WHERE \"played\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What was the total number of games played by se freising when their points were larger than 13?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"played\") FROM \"first_round\" WHERE \"name\"='se freising' AND \"points\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What was the average losses for team with points larger than 3 and played larger thna 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"first_round\" WHERE \"points\">3 AND \"played\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many losses did ev bruckberg have when the drawn was more than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"first_round\" WHERE \"name\"='ev bruckberg' AND \"drawn\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_vivian_davis_figures\" text,\n \"republican_jeff_sessions\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the poll source when Jeff Sessions is at 58% and the date administered is July 31, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"republican_jeff_sessions\"='58%' AND \"dates_administered\"='july 31, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_vivian_davis_figures\" text,\n \"republican_jeff_sessions\" text,\n \"lead_margin\" real\n);\n\nQuestion: What was the date administered from a source of Rasmussen Reports and a lead margin over 32?"
},
{
"role": "assistant",
"content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"poll_source\"='rasmussen reports' AND \"lead_margin\">32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_vivian_davis_figures\" text,\n \"republican_jeff_sessions\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the date administered when Vivian Davis Figures was at 37%?"
},
{
"role": "assistant",
"content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"democrat_vivian_davis_figures\"='37%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_vivian_davis_figures\" text,\n \"republican_jeff_sessions\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the date administered when Vivian Davis Figures was at 36%?"
},
{
"role": "assistant",
"content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"democrat_vivian_davis_figures\"='36%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_vivian_davis_figures\" text,\n \"republican_jeff_sessions\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is the poll source for Vivian Davis Figures at 29% and a lead margin greater than 27?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"lead_margin\">27 AND \"democrat_vivian_davis_figures\"='29%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"detroit_red_wings_4_chicago_black_hawks_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of the Chicago Black Hawks Home game on March 28?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"detroit_red_wings_4_chicago_black_hawks_\" WHERE \"home\"='chicago black hawks' AND \"date\"='march 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"detroit_red_wings_4_chicago_black_hawks_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Visitor of the game on April 2?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"detroit_red_wings_4_chicago_black_hawks_\" WHERE \"date\"='april 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"detroit_red_wings_4_chicago_black_hawks_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Home team on April 4?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"detroit_red_wings_4_chicago_black_hawks_\" WHERE \"date\"='april 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"detroit_red_wings_4_chicago_black_hawks_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Visitor on March 31?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"detroit_red_wings_4_chicago_black_hawks_\" WHERE \"date\"='march 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"detroit_red_wings_4_chicago_black_hawks_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Home team on April 2?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"detroit_red_wings_4_chicago_black_hawks_\" WHERE \"date\"='april 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"detroit_red_wings_4_chicago_black_hawks_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Date of the game with a Record of 2-3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"detroit_red_wings_4_chicago_black_hawks_\" WHERE \"record\"='2-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"designated_grand_prix\" text,\n \"track\" text,\n \"250_cc\" text,\n \"350_cc\" text,\n \"500_cc\" text,\n \"report\" text\n);\n\nQuestion: What year did Freddie Frith win the 350cc and Enrico Lorenzetti win the 500cc?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"by_year\" WHERE \"350_cc\"='freddie frith' AND \"500_cc\"='enrico lorenzetti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"designated_grand_prix\" text,\n \"track\" text,\n \"250_cc\" text,\n \"350_cc\" text,\n \"500_cc\" text,\n \"report\" text\n);\n\nQuestion: What track was used in 1926?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"by_year\" WHERE \"year\"='1926';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"designated_grand_prix\" text,\n \"track\" text,\n \"250_cc\" text,\n \"350_cc\" text,\n \"500_cc\" text,\n \"report\" text\n);\n\nQuestion: Who won the 250cc in 1927?"
},
{
"role": "assistant",
"content": "SELECT \"250_cc\" FROM \"by_year\" WHERE \"year\"='1927';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"designated_grand_prix\" text,\n \"track\" text,\n \"250_cc\" text,\n \"350_cc\" text,\n \"500_cc\" text,\n \"report\" text\n);\n\nQuestion: What grand prix was held at Granollers?"
},
{
"role": "assistant",
"content": "SELECT \"designated_grand_prix\" FROM \"by_year\" WHERE \"track\"='granollers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" text,\n \"designated_grand_prix\" text,\n \"track\" text,\n \"250_cc\" text,\n \"350_cc\" text,\n \"500_cc\" text,\n \"report\" text\n);\n\nQuestion: Who won the 350cc at Sachsenring?"
},
{
"role": "assistant",
"content": "SELECT \"350_cc\" FROM \"by_year\" WHERE \"track\"='sachsenring';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_l_2_8_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: Which fleet numbers has quanitity of 13?"
},
{
"role": "assistant",
"content": "SELECT \"fleet_number_s\" FROM \"class_l_2_8_2\" WHERE \"quantity_made\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_l_2_8_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: Which wheel arrangement made in year 1900?"
},
{
"role": "assistant",
"content": "SELECT \"wheel_arrangement\" FROM \"class_l_2_8_2\" WHERE \"year_made\"='1900';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_l_2_8_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: Which fleet numbers has quantity of 1?"
},
{
"role": "assistant",
"content": "SELECT \"fleet_number_s\" FROM \"class_l_2_8_2\" WHERE \"quantity_made\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_6_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the partner is florencia labat, the surface is clay, the opponents is laura golarsa ann grossman?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_11_6_5\" WHERE \"partner\"='florencia labat' AND \"surface\"='clay' AND \"opponents\"='laura golarsa ann grossman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_6_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: who is the opponents when the surface is clay and the date is 12 july 1992?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_11_6_5\" WHERE \"surface\"='clay' AND \"date\"='12 july 1992';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_6_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: what is the tournament when the outcome is winner and the opponents is kerry-anne guse corina morariu?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_11_6_5\" WHERE \"outcome\"='winner' AND \"opponents\"='kerry-anne guse corina morariu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_6_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the partner is alexandra fusai?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_11_6_5\" WHERE \"partner\"='alexandra fusai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_6_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: what is the surface when the opponents are louise field nathalie herreman?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_11_6_5\" WHERE \"opponents\"='louise field nathalie herreman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_11_6_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the surface is clay and the tournament is san marino?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_11_6_5\" WHERE \"surface\"='clay' AND \"tournament\"='san marino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: If the manufacturer is Yamaha, and the laps driven were under 32, what's the average of all grid sizes with that criteria?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"moto_gp_classification\" WHERE \"laps\"<32 AND \"manufacturer\"='yamaha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What's the smallest amount of laps that suzuki ran with a grid value of 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"moto_gp_classification\" WHERE \"manufacturer\"='suzuki' AND \"grid\"=8;"
}
] |
[
{
"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 \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who were the opponents when the score of the game was 101-105 and the H/A/N was H?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"march\" WHERE \"h_a_n\"='h' AND \"score\"='101-105';"
}
] |
[
{
"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 \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game against the Baltimore Bullets when the H/A/N was H?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"march\" WHERE \"opponent\"='baltimore bullets' AND \"h_a_n\"='h';"
}
] |
[
{
"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 \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game against the baltimore bullets on March 14?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"opponent\"='baltimore bullets' AND \"date\"='march 14';"
}
] |
[
{
"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 \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who were the opponents when the score was 122-135 and the H/A/N was H?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"march\" WHERE \"h_a_n\"='h' AND \"score\"='122-135';"
}
] |
[
{
"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 \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game where the record was 22-55?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"record\"='22-55';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the average games that were drawn with ERSC Amberg as name and less than 14 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"drawn\") FROM \"first_round\" WHERE \"name\"='ersc amberg' AND \"points\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total position with a drawn of 0 and greater than 22 points and a greater than 14 played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"first_round\" WHERE \"drawn\"=0 AND \"points\">22 AND \"played\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_at_number_one\" real,\n \"song\" text,\n \"artist_s\" text\n);\n\nQuestion: Which Issue date(s) has a Weeks at number one of 5, and a Volume:Issue of 61:17-21?"
},
{
"role": "assistant",
"content": "SELECT \"issue_date_s\" FROM \"notes\" WHERE \"weeks_at_number_one\"=5 AND \"volume_issue\"='61:17-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_at_number_one\" real,\n \"song\" text,\n \"artist_s\" text\n);\n\nQuestion: Which Song has a Weeks at number one larger than 2, and an Issue date(s) of 17 april - 8 may?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"notes\" WHERE \"weeks_at_number_one\">2 AND \"issue_date_s\"='17 april - 8 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_at_number_one\" real,\n \"song\" text,\n \"artist_s\" text\n);\n\nQuestion: Which Weeks at number one has a Volume:Issue of 61:22-23?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"weeks_at_number_one\") FROM \"notes\" WHERE \"volume_issue\"='61:22-23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_at_number_one\" real,\n \"song\" text,\n \"artist_s\" text\n);\n\nQuestion: Which Song has an Issue date(s) of 29 may - 26 june?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"notes\" WHERE \"issue_date_s\"='29 may - 26 june';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: what is the report when the home team is new zealand breakers?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"round_1\" WHERE \"home_team\"='new zealand breakers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: what is the score when the home team is cairns taipans?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_1\" WHERE \"home_team\"='cairns taipans';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Who is the away team when the venue is cairns convention centre?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"venue\"='cairns convention centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: who is the away team when the home team is sydney spirit?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"home_team\"='sydney spirit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: what is the box score when the home team is melbourne tigers?"
},
{
"role": "assistant",
"content": "SELECT \"box_score\" FROM \"round_1\" WHERE \"home_team\"='melbourne tigers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: who is the away team on 21 september?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"date\"='21 september';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: When Ernie Els placed t2, what was his To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='t2' AND \"player\"='ernie els';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Where did Jay Haas place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='jay haas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Where did Jim Furyk place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='jim furyk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Jim Furyk's score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='jim furyk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the score for the To par of +1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"to_par\"='+1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who placed in t5 and scored 73-69-68=210?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"place\"='t5' AND \"score\"='73-69-68=210';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent when the record was 11-6-2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='11-6-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the home team of the match with an attendance greater than 202?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round\" WHERE \"attendance\">202;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance of the match with arlesey town as the home team?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"fourth_round\" WHERE \"home_team\"='arlesey town';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race\" real,\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: When was the Lakeside race where Paul Morris won?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"race_title\"='lakeside' AND \"winner\"='paul morris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game against the phoenix suns?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"november\" WHERE \"opponent\"='phoenix suns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the opponent of the game when the reocrd was 0-12?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"november\" WHERE \"record\"='0-12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: How many years had a location at Forest Hills and a score of 6\u20133, 6\u20133 for John McEnroe?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"singles\" WHERE \"location\"='forest hills' AND \"runner_up\"='john mcenroe' AND \"score\"='6\u20133, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Who is the champion with a score of 7\u20136, 6\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"singles\" WHERE \"score\"='7\u20136, 6\u20130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Who is the runner-up in 1990?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"singles\" WHERE \"year\"=1990;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: When was the earliest year that Guillermo Vilas was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"singles\" WHERE \"runner_up\"='guillermo vilas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013\" (\n \"date\" text,\n \"place\" text,\n \"race_winners\" text,\n \"gp_winner\" text,\n \"source\" text\n);\n\nQuestion: What source has a race winner of ben adriaenssen / ben van den bogaart, and the gp winner of ben adriaenssen / ben van den bogaart, for the date of 1 april?"
},
{
"role": "assistant",
"content": "SELECT \"source\" FROM \"2013\" WHERE \"race_winners\"='ben adriaenssen / ben van den bogaart' AND \"gp_winner\"='ben adriaenssen / ben van den bogaart' AND \"date\"='1 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013\" (\n \"date\" text,\n \"place\" text,\n \"race_winners\" text,\n \"gp_winner\" text,\n \"source\" text\n);\n\nQuestion: What is the GP winner for the Race winners valentin giraud / nicolas musset, and a place genk?"
},
{
"role": "assistant",
"content": "SELECT \"gp_winner\" FROM \"2013\" WHERE \"race_winners\"='valentin giraud / nicolas musset' AND \"place\"='genk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013\" (\n \"date\" text,\n \"place\" text,\n \"race_winners\" text,\n \"gp_winner\" text,\n \"source\" text\n);\n\nQuestion: What is the date for a source of result and a place of iffendic?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2013\" WHERE \"source\"='result' AND \"place\"='iffendic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013\" (\n \"date\" text,\n \"place\" text,\n \"race_winners\" text,\n \"gp_winner\" text,\n \"source\" text\n);\n\nQuestion: What date has a place of chernivtsi, and a race winners of etienne bax / kaspars stupelis? What"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2013\" WHERE \"place\"='chernivtsi' AND \"race_winners\"='etienne bax / kaspars stupelis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013\" (\n \"date\" text,\n \"place\" text,\n \"race_winners\" text,\n \"gp_winner\" text,\n \"source\" text\n);\n\nQuestion: What is the GP winner with a place of genk, with race winners ben adriaenssen / ben van den bogaart?"
},
{
"role": "assistant",
"content": "SELECT \"gp_winner\" FROM \"2013\" WHERE \"place\"='genk' AND \"race_winners\"='ben adriaenssen / ben van den bogaart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013\" (\n \"date\" text,\n \"place\" text,\n \"race_winners\" text,\n \"gp_winner\" text,\n \"source\" text\n);\n\nQuestion: What is the race winners for the date of 23 june?"
},
{
"role": "assistant",
"content": "SELECT \"race_winners\" FROM \"2013\" WHERE \"date\"='23 june';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What date was the opponent in the final Barbara Paulus?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"wins_5\" WHERE \"opponent_in_the_final\"='barbara paulus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the surface that Laura Golarsa and her opponent played on in the final?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"wins_5\" WHERE \"opponent_in_the_final\"='laura golarsa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score for the opponent against Katerina Maleeva in the final?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"wins_5\" WHERE \"opponent_in_the_final\"='katerina maleeva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What's the name that had a moving to Anorthosis Famagusta and a transfer window of winter?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"squad_changes\" WHERE \"transfer_window\"='winter' AND \"moving_to\"='anorthosis famagusta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the Nat with a mutual consent loan return and has a free transfer fee?"
},
{
"role": "assistant",
"content": "SELECT \"nat\" FROM \"squad_changes\" WHERE \"transfer_fee\"='free' AND \"type\"='mutual consent loan return';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the type of POR?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"squad_changes\" WHERE \"nat\"='por';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_changes\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What's the name of MKD?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"squad_changes\" WHERE \"nat\"='mkd';"
}
] |
[
{
"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 \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of the attendance on November 24?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"date\"='november 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: What team did the Flames play against when 526 people attended the game?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"october\" WHERE \"attendance\"=526;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: Rick Plant was the man of the match in what competition?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"october\" WHERE \"man_of_the_match\"='rick plant';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: Who did the Flames play against when Stephen Lee was the man of the match?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"october\" WHERE \"man_of_the_match\"='stephen lee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: How many people attended the game when the game was won 4-2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"october\" WHERE \"result\"='won 4-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: For what competition was the venue away the n/a the man of the match?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"october\" WHERE \"venue\"='away' AND \"man_of_the_match\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_list\" (\n \"rank\" real,\n \"company\" text,\n \"country\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is BP's lowest sales?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"sales_billion\") FROM \"2005_list\" WHERE \"company\"='bp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the record of the Denver Broncos when they play at Mile High Stadium against the Minnesota Vikings and 38,494 fans were in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"attendance\">'38,494' AND \"game_site\"='mile high stadium' AND \"opponent\"='minnesota vikings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the final game result that was played on December 2?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='december 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What week was the game played at Rich Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"game_site\"='rich stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" real,\n \"league_cup_goals\" text,\n \"total\" real\n);\n\nQuestion: What is the sum of FA Cup goals when there are 19 league goals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"fa_cup_goals\") FROM \"third_division\" WHERE \"league_goals\"='19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" real,\n \"league_cup_goals\" text,\n \"total\" real\n);\n\nQuestion: Which club has 16 league goals for a total of 20?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"third_division\" WHERE \"league_goals\"='16' AND \"total\"=20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" real,\n \"league_cup_goals\" text,\n \"total\" real\n);\n\nQuestion: How many League Cup goals correspond to 3 FA Cup Goals and a total over 15 for Chesterfield?"
},
{
"role": "assistant",
"content": "SELECT \"league_cup_goals\" FROM \"third_division\" WHERE \"total\">15 AND \"fa_cup_goals\"=3 AND \"club\"='chesterfield';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What was the result of the april 6, 2002 game against the greensboro prowlers?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"regular_season\" WHERE \"opponent\"='greensboro prowlers' AND \"date\"='april 6, 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"projects_as_of_march_2013\" (\n \"building\" text,\n \"location\" text,\n \"height\" text,\n \"floors\" real,\n \"status\" text\n);\n\nQuestion: Which Location has Floors smaller than 27, and a Building of 150 elgin?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"projects_as_of_march_2013\" WHERE \"floors\"<27 AND \"building\"='150 elgin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"projects_as_of_march_2013\" (\n \"building\" text,\n \"location\" text,\n \"height\" text,\n \"floors\" real,\n \"status\" text\n);\n\nQuestion: Which Status has a Building of the rhombus?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"projects_as_of_march_2013\" WHERE \"building\"='the rhombus';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.