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 \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Leading Scorer is Tyrone Hill , 20 Points?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"january\" WHERE \"leading_scorer\"='tyrone hill , 20 points';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Home, when Score is 103-93?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"january\" WHERE \"score\"='103-93';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Attendance, when Home is Cleveland, and when Date is January 30?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"january\" WHERE \"home\"='cleveland' AND \"date\"='january 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Leading Scorer, when Attendance is Gund Arena 20,562, and when Record is 20-10?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"january\" WHERE \"attendance\"='gund arena 20,562' AND \"record\"='20-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Date is January 12?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"january\" WHERE \"date\"='january 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Attendance is Gund Arena 20,562, and when Date is January 27?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"january\" WHERE \"attendance\"='gund arena 20,562' AND \"date\"='january 27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the sum of Top-10(s), when Cuts made is less than 10, and when Top-5 is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"top_10\") FROM \"summary\" WHERE \"cuts_made\"<10 AND \"top_5\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest Top-25, when Events is 10, and when Wins is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"top_25\") FROM \"summary\" WHERE \"events\"=10 AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest Top-5, when Top-25 is less than 4, and when Cuts made is less than 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"top_5\") FROM \"summary\" WHERE \"top_25\"<4 AND \"cuts_made\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"position\" text,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What is the Height of Junior Meghan Austin?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"roster\" WHERE \"year\"='junior' AND \"name\"='meghan austin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"position\" text,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What is Martina Wood's Position?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"roster\" WHERE \"name\"='martina wood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"position\" text,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What is the Name of the Player from Charlotte, NC?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"roster\" WHERE \"home_town\"='charlotte, nc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"position\" text,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What is 6-2 Martina Wood's Position?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"roster\" WHERE \"height\"='6-2' AND \"name\"='martina wood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"position\" text,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What is the Position of the Player from Temple Hills, MD?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"roster\" WHERE \"home_town\"='temple hills, md';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"position\" text,\n \"year\" text,\n \"home_town\" text\n);\n\nQuestion: What is the Name of the Junior from Fayetteville, NC?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"roster\" WHERE \"year\"='junior' AND \"home_town\"='fayetteville, nc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What rank has jo angel (wa) as the player?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"most_career_wickets\" WHERE \"player\"='jo angel (wa)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What average has 1 as rhe rank?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"most_career_wickets\" WHERE \"rank\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What rank has andy bichel (qld) as the player?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"most_career_wickets\" WHERE \"player\"='andy bichel (qld)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What is the average that has 2 for the rank?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"most_career_wickets\" WHERE \"rank\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What playee has 24.21 as the average?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_career_wickets\" WHERE \"average\"='24.21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What is the average that has 441 as wicket?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"most_career_wickets\" WHERE \"s_wicket\"='441';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races_and_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"2008_candidates\" text,\n \"results\" text\n);\n\nQuestion: What was the year Elected of Republican Incumbent Dave Reichert?"
},
{
"role": "assistant",
"content": "SELECT \"elected\" FROM \"races_and_results\" WHERE \"party\"='republican' AND \"incumbent\"='dave reichert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races_and_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"2008_candidates\" text,\n \"results\" text\n);\n\nQuestion: What were the Results in the Washington 2 District?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"races_and_results\" WHERE \"district\"='washington 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races_and_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"2008_candidates\" text,\n \"results\" text\n);\n\nQuestion: What is the 2008 Candidates Elected before 1994 with Incumbent Jim McDermott?"
},
{
"role": "assistant",
"content": "SELECT \"2008_candidates\" FROM \"races_and_results\" WHERE \"elected\"<1994 AND \"incumbent\"='jim mcdermott';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races_and_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"2008_candidates\" text,\n \"results\" text\n);\n\nQuestion: Who is the Incumbent with Results of 68% 32%?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"races_and_results\" WHERE \"results\"='68% 32%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"races_and_results\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"elected\" real,\n \"status\" text,\n \"2008_candidates\" text,\n \"results\" text\n);\n\nQuestion: What District had Republican Incumbent Cathy McMorris?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"races_and_results\" WHERE \"party\"='republican' AND \"incumbent\"='cathy mcmorris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was Italy's highest total when there were less than 4 bronze and 1 gold?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medals_table\" WHERE \"bronze\"<4 AND \"gold\"=1 AND \"nation\"='italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many totals had more than 4 bronze?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"medals_table\" WHERE \"bronze\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was Austria's lowest total when the gold was more than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medals_table\" WHERE \"nation\"='austria' AND \"gold\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What are the years won when the to par is +5?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"to_par\"='+5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the average total for Tiger Woods?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"player\"='tiger woods';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which country had a total of 295?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"total\"=295;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the finish when the to par is +18?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"to_par\"='+18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_results\" (\n \"matches\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"success_rate\" text\n);\n\nQuestion: How many total No Results occured when the team had less than 46 wins and more than 16 matches?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"no_result\") FROM \"summary_of_results\" WHERE \"matches\">16 AND \"wins\"<46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_results\" (\n \"matches\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"success_rate\" text\n);\n\nQuestion: When the team had more than 46 wins, what were the average losses?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"summary_of_results\" WHERE \"wins\">46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_results\" (\n \"matches\" real,\n \"wins\" real,\n \"losses\" real,\n \"no_result\" real,\n \"success_rate\" text\n);\n\nQuestion: How many total No Results are recorded for less than 6 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_result\") FROM \"summary_of_results\" WHERE \"wins\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: What Interview subject was on a Date that is 11-92?"
},
{
"role": "assistant",
"content": "SELECT \"interview_subject\" FROM \"1992\" WHERE \"date\"='11-92';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest game number with Aris Thessaloniki with points smaller than 120?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"games\") FROM \"points\" WHERE \"team\"='aris thessaloniki' AND \"points\"<120;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the game average that has a rank larger than 2 with team Olympiacos and points larger than 113?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"games\") FROM \"points\" WHERE \"rank\">2 AND \"team\"='olympiacos' AND \"points\">113;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which result was there when the opponents were the Buffalo Bills?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"opponent\"='buffalo bills';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What was the Purse ($) total for Iowa?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"purse\") FROM \"tournament_results\" WHERE \"location\"='iowa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: When did the Score of 195 (-21) happen?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"tournament_results\" WHERE \"score\"='195 (-21)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: When did Scott Hoch (2) win?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"tournament_results\" WHERE \"winner\"='scott hoch (2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_to_date\" (\n \"season\" text,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text\n);\n\nQuestion: What team placed second during the season where Western Australia placed fifth, South Australia placed sixth, and Tasmania placed fourth?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"2000_01_to_date\" WHERE \"fifth\"='western australia' AND \"sixth\"='south australia' AND \"fourth\"='tasmania';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_to_date\" (\n \"season\" text,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text\n);\n\nQuestion: What team placed sixth during the season where Western Australia placed fourth and Tasmania placed first?"
},
{
"role": "assistant",
"content": "SELECT \"sixth\" FROM \"2000_01_to_date\" WHERE \"fourth\"='western australia' AND \"first\"='tasmania';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_to_date\" (\n \"season\" text,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text\n);\n\nQuestion: What team placed sixth during the season where Tasmania placed second and Western Australia placed fourth?"
},
{
"role": "assistant",
"content": "SELECT \"sixth\" FROM \"2000_01_to_date\" WHERE \"second\"='tasmania' AND \"fourth\"='western australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_to_date\" (\n \"season\" text,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text\n);\n\nQuestion: What team placed fifth during the season where Victoria placed second, Tasmania placed first, and South Australia placed sixth?"
},
{
"role": "assistant",
"content": "SELECT \"fifth\" FROM \"2000_01_to_date\" WHERE \"second\"='victoria' AND \"first\"='tasmania' AND \"sixth\"='south australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the smallest number of losses for a position greater than 2 with 4 points and more than 2 draws?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"campeonato_paulista\" WHERE \"position\">2 AND \"points\"=4 AND \"drawn\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many points occurred with a difference of 2 for position less than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"campeonato_paulista\" WHERE \"difference\"='2' AND \"position\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest number of points for a position less than 3 and less than 1 loss?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"campeonato_paulista\" WHERE \"position\"<3 AND \"lost\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"premier_division\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which date's attendance was more than 39,058 with an opponent of Motherwell?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"premier_division\" WHERE \"attendance\">'39,058' AND \"opponent\"='motherwell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round_ii\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: In the round that had a 2nd leg score of 0-2, what did they score for the 1st leg?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"preliminary_round_ii\" WHERE \"2nd_leg\"='0-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round_ii\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: When Estudiantes was team #2, what was their agg. value?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"preliminary_round_ii\" WHERE \"team_num2\"='estudiantes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round_ii\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who played against TSV bayer 04 leverkusen when they were team #1?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"preliminary_round_ii\" WHERE \"team_num1\"='tsv bayer 04 leverkusen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round_ii\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who played against Hapoel tel aviv when they were team #1?"
},
{
"role": "assistant",
"content": "SELECT \"team_num2\" FROM \"preliminary_round_ii\" WHERE \"team_num1\"='hapoel tel aviv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"team\" text,\n \"conf\" text,\n \"conf_finish\" text,\n \"div\" text,\n \"div_finish\" text,\n \"awards\" text,\n \"head_coach\" text\n);\n\nQuestion: what is the division in the western conference that finished 2nd in their division under rick adelman?"
},
{
"role": "assistant",
"content": "SELECT \"div\" FROM \"seasons\" WHERE \"conf\"='western' AND \"div_finish\"='2nd' AND \"head_coach\"='rick adelman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bafa_national_leagues\" (\n \"team\" text,\n \"location\" text,\n \"years_in_senior_adult_league\" text,\n \"2013_bafa_adult_division\" text,\n \"2013_bafa_adult_flag_division\" text,\n \"2013_bafa_junior_division\" text,\n \"other_teams\" text\n);\n\nQuestion: What is the 2013 BAFA adult flag division in Aylesbury?"
},
{
"role": "assistant",
"content": "SELECT \"2013_bafa_adult_flag_division\" FROM \"bafa_national_leagues\" WHERE \"location\"='aylesbury';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bafa_national_leagues\" (\n \"team\" text,\n \"location\" text,\n \"years_in_senior_adult_league\" text,\n \"2013_bafa_adult_division\" text,\n \"2013_bafa_adult_flag_division\" text,\n \"2013_bafa_junior_division\" text,\n \"other_teams\" text\n);\n\nQuestion: What is the 2013 BAFA junior division with a 2013 BAFA adult division in national central in the Birkenhead location?"
},
{
"role": "assistant",
"content": "SELECT \"2013_bafa_junior_division\" FROM \"bafa_national_leagues\" WHERE \"2013_bafa_adult_division\"='national central' AND \"location\"='birkenhead';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Records from Kontor Records from the catalog of Kontor446 was released in what format?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='kontor records' AND \"catalog\"='kontor446';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date was the release that was Wrongun as the label?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='wrongun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Catalog Nebdj068 was released when?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='nebdj068';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: In what format was the release from the Nebt068 catalog on April 11, 2005 in?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='april 11, 2005' AND \"catalog\"='nebt068';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What region has the date of 2005 and Playground Music Scandinavia as a label?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='2005' AND \"label\"='playground music scandinavia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Result with a Venue that is filbert street?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"first_division\" WHERE \"venue\"='filbert street';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: When did the Texans play BYE?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who did the Texans play when there were 70,724 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='70,724';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_taxa\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: Who has the status of jr synonym of protosialis casca?"
},
{
"role": "assistant",
"content": "SELECT \"novelty\" FROM \"new_taxa\" WHERE \"status\"='jr synonym of protosialis casca';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_taxa\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: Which writer is named mongolbittacus?"
},
{
"role": "assistant",
"content": "SELECT \"authors\" FROM \"new_taxa\" WHERE \"name\"='mongolbittacus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the score of the game that had 359 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"attendance\"='359';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the home team of the game that ended with a score of 0-1?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round\" WHERE \"score\"='0-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: How many people attended Match No. 31?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"second_round\" WHERE \"match_no\"='31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the Home Team for Match No. 23?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round\" WHERE \"match_no\"='23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the score of the game with 1,125 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"attendance\"='1,125';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tv_channels\" (\n \"channel\" text,\n \"country\" text,\n \"type\" text,\n \"launched\" text,\n \"description\" text\n);\n\nQuestion: What is the Country with a Launched that is april 3, 1990?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"tv_channels\" WHERE \"launched\"='april 3, 1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tv_channels\" (\n \"channel\" text,\n \"country\" text,\n \"type\" text,\n \"launched\" text,\n \"description\" text\n);\n\nQuestion: What is the Launched from a Country that is spain?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"tv_channels\" WHERE \"country\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_ministers_for_small_business\" (\n \"order\" real,\n \"minister\" text,\n \"party_affiliation\" text,\n \"prime_minister\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"term_in_office\" text\n);\n\nQuestion: What is the lowest order with a Minister that is joe hockey?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"order\") FROM \"list_of_ministers_for_small_business\" WHERE \"minister\"='joe hockey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Years in Orlando has a Nationality of united states, and a Player of doug overton?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_orlando\" FROM \"o\" WHERE \"nationality\"='united states' AND \"player\"='doug overton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Years in Orlando has a Nationality of united states, a Position of center, and a Player of jawann oldham?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_orlando\" FROM \"o\" WHERE \"nationality\"='united states' AND \"position\"='center' AND \"player\"='jawann oldham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Years in Orlando has a Player of bo outlaw?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_orlando\" FROM \"o\" WHERE \"player\"='bo outlaw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Years in Orlando has a School/Club Team of seattle?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_orlando\" FROM \"o\" WHERE \"school_club_team\"='seattle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Nationality has a Position of center, and a Years in Orlando of 2010\u20132012?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"o\" WHERE \"position\"='center' AND \"years_in_orlando\"='2010\u20132012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Nationality has a School/Club Team of seattle?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"o\" WHERE \"school_club_team\"='seattle';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: When did they play at Candlestick Park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"game_site\"='candlestick park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of top-10s for events under 57 and 0 top-5s?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_10\") FROM \"summary\" WHERE \"events\"<57 AND \"top_5\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of top-10s for events with more than 12 cuts made and 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_10\") FROM \"summary\" WHERE \"cuts_made\">12 AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of top-25s for events with less than 2 top-10s?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_25\") FROM \"summary\" WHERE \"top_10\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: Which Works number has a Builder of canadian engine & machinery company, and a Number smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"works_number\" FROM \"locomotives\" WHERE \"builder\"='canadian engine & machinery company' AND \"number\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: Which Works number has a Builder of avonside engine company, and a Type of 4-6-0, and a Number smaller than 12, and a Date of december 1871?"
},
{
"role": "assistant",
"content": "SELECT \"works_number\" FROM \"locomotives\" WHERE \"builder\"='avonside engine company' AND \"type\"='4-6-0' AND \"number\"<12 AND \"date\"='december 1871';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: Which Type has a Builder of avonside engine company, and a Number of 9?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"locomotives\" WHERE \"builder\"='avonside engine company' AND \"number\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: Which Date has a Type of 4-6-0, and a Number larger than 11?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"locomotives\" WHERE \"type\"='4-6-0' AND \"number\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: Which Builder has a Date of early 1871?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"locomotives\" WHERE \"date\"='early 1871';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What ist he Home with a Score that is 42-64?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_four\" WHERE \"score\"='42-64';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Home with a Time that is 12:00?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_four\" WHERE \"time\"='12:00';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"away\" text,\n \"score\" text,\n \"ground\" text\n);\n\nQuestion: What is the Ground with a Score that is 49-80?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"round_four\" WHERE \"score\"='49-80';"
}
] |
[
{
"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 \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What's the smallest March when the record is 22-12-6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"march\") FROM \"schedule_and_results\" WHERE \"record\"='22-12-6';"
}
] |
[
{
"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 \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which record's march was 26?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"march\"=26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the Lost with a Losing Bonus that is 4?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"losing_bonus\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the Points with a Tries For that is 21?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"league_table\" WHERE \"tries_for\"='21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the Lost with a Try Bonus that is try bonus?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"league_table\" WHERE \"try_bonus\"='try bonus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest Total for the rank 12, and gold less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"rank\"='12' AND \"gold\"<0;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.