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 \"original_broadway_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What is the sum of Year, when Award is \"Outer Critics Circle Award\", and when Nominee is \"Nathan Lane\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"original_broadway_production\" WHERE \"award\"='outer critics circle award' AND \"nominee\"='nathan lane';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"name\" text,\n \"builder\" text,\n \"type\" text,\n \"works_number\" text,\n \"built\" real\n);\n\nQuestion: What is Name, when Builder is \"Kerr Stuart\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"locomotives\" WHERE \"builder\"='kerr stuart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"name\" text,\n \"builder\" text,\n \"type\" text,\n \"works_number\" text,\n \"built\" real\n);\n\nQuestion: What is Built, when Works Number is \"717\"?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"locomotives\" WHERE \"works_number\"='717';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"name\" text,\n \"builder\" text,\n \"type\" text,\n \"works_number\" text,\n \"built\" real\n);\n\nQuestion: What is Type, when Works Number is \"unknown\"?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"locomotives\" WHERE \"works_number\"='unknown';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is the circuit for the ADAC gro\u00dfer preis der tourenwagen race?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar_and_winners\" WHERE \"race\"='adac gro\u00dfer preis der tourenwagen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What is the date that Fabrizio Giovanardi Christian Abt won?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar_and_winners\" WHERE \"winning_driver\"='fabrizio giovanardi christian abt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team has 16 as the tie no.?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"tie_no\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What score has hull city as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='hull city';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What away team has 12 as the tie no.?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"second_round_proper\" WHERE \"tie_no\"='12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date has 11 as the tie no.?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"second_round_proper\" WHERE \"tie_no\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team has blackpool as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"away_team\"='blackpool';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the surface when the opponent was sergiy stakhovsky mikhail youzhny?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_6_2_4\" WHERE \"opponents\"='sergiy stakhovsky mikhail youzhny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the score for the opponent luk\u00e1\u0161 dlouh\u00fd leander paes?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_6_2_4\" WHERE \"opponents\"='luk\u00e1\u0161 dlouh\u00fd leander paes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What day was there a hard surface when the partner was Marc Gicquel?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_6_2_4\" WHERE \"surface\"='hard' AND \"partner\"='marc gicquel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lightweight_58_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the total (kg) when the snatch was 84, and bodyweight was less than 57.35?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_kg\") FROM \"lightweight_58_kg\" WHERE \"snatch\"=84 AND \"bodyweight\"<57.35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lightweight_58_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the clean & jerk when the total (kg) is more than 204, and snatch is more than 98?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"clean_jerk\") FROM \"lightweight_58_kg\" WHERE \"total_kg\">204 AND \"snatch\">98;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lightweight_58_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the total (kg when the bodyweight is more than 57.8, and the clean & jerk is less than 103?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_kg\") FROM \"lightweight_58_kg\" WHERE \"bodyweight\">57.8 AND \"clean_jerk\"<103;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Overall of the pick less than 20?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"nfl_draft\" WHERE \"pick_num\"<20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the name of the cornerback from Wisconsin college?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"nfl_draft\" WHERE \"position\"='cornerback' AND \"college\"='wisconsin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college is Pat Thomas from?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"name\"='pat thomas';"
}
]
|
[
{
"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 best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_10\") FROM \"summary\" WHERE \"events\"<39 AND \"top_5\"=1 AND \"cuts_made\">5;"
}
]
|
[
{
"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: How many cuts made when the top-5 is greater than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"cuts_made\") FROM \"summary\" WHERE \"top_5\">1;"
}
]
|
[
{
"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 best top-5 when top-10 is 1 and there are more than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_5\") FROM \"summary\" WHERE \"top_10\"=1 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 number of cuts made when the top-5 is 0, top-10 is 1 and events are fewer than 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"cuts_made\") FROM \"summary\" WHERE \"top_5\"=0 AND \"top_10\"=1 AND \"events\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg for Team 2, Leeds United?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"fourth_round\" WHERE \"team_2\"='leeds united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg for Team 2, Slovan Liberec?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"fourth_round\" WHERE \"team_2\"='slovan liberec';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 1, has Team 2, Slovan Liberec?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"fourth_round\" WHERE \"team_2\"='slovan liberec';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the date of the match with west bromwich albion as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"home_team\"='west bromwich albion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" real,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the highest Apps of kairat after 2008 and a Level smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"apps\") FROM \"club_career_stats\" WHERE \"season\">2008 AND \"team\"='kairat' AND \"level\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" real,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the total Level with 27 Apps after 2006?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"level\") FROM \"club_career_stats\" WHERE \"apps\"=27 AND \"season\">2006;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" real,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the lowest Apps with more than 1 level?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"apps\") FROM \"club_career_stats\" WHERE \"level\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" real,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: what is the total levels in 2007?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"level\") FROM \"club_career_stats\" WHERE \"season\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_london_revival\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: How many times is the award ceremony laurence olivier award, result is won and the nominee is imelda staunton?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"2012_london_revival\" WHERE \"award_ceremony\"='laurence olivier award' AND \"result\"='won' AND \"nominee\"='imelda staunton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_london_revival\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: what is the result when the category is best sound design?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2012_london_revival\" WHERE \"category\"='best sound design';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the total byes for more than 1 draw?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"byes\") FROM \"2007_ladder\" WHERE \"draws\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What Hometown/School had a pick above 30, position of OF and team of Cleveland Indians?"
},
{
"role": "assistant",
"content": "SELECT \"hometown_school\" FROM \"supplemental_first_round_selections\" WHERE \"pick\">30 AND \"position\"='of' AND \"team\"='cleveland indians';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What's the highest pick for SS position?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"supplemental_first_round_selections\" WHERE \"position\"='ss';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What pick did the Minnesota Twins have?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"supplemental_first_round_selections\" WHERE \"team\"='minnesota twins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average Draws, when Losses is less than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draws\") FROM \"2006_ladder\" WHERE \"losses\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average Wins, when Against is less than 1786, when Losses is less than 4, and when Byes is less than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"2006_ladder\" WHERE \"against\"<1786 AND \"losses\"<4 AND \"byes\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What is Country, when Class / Type is \"Three masted full rigged ship\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"see_also\" WHERE \"class_type\"='three masted full rigged ship';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What is Builder, when Country is \"United Kingdom\", and when Location is \"Chatham, Kent\"?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"see_also\" WHERE \"country\"='united kingdom' AND \"location\"='chatham, kent';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What is Builder, when Ship is \"Arizona\"?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"see_also\" WHERE \"ship\"='arizona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What is Location, when Class / Type is \"Sloop\"?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"see_also\" WHERE \"class_type\"='sloop';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What is Country, when Builder is \"Sheerness Dockyard\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"see_also\" WHERE \"builder\"='sheerness dockyard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What is Builder, when Location is \"Govan , Scotland\"?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"see_also\" WHERE \"location\"='govan , scotland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_goals_in_a_season_all_competitions_\" (\n \"rank\" real,\n \"name\" text,\n \"season\" text,\n \"club\" text,\n \"goals\" real,\n \"apps\" real,\n \"goals_per_match\" real\n);\n\nQuestion: How many ranks have 40 as the apps, with goals per match greater than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"most_goals_in_a_season_all_competitions_\" WHERE \"apps\"=40 AND \"goals_per_match\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_goals_in_a_season_all_competitions_\" (\n \"rank\" real,\n \"name\" text,\n \"season\" text,\n \"club\" text,\n \"goals\" real,\n \"apps\" real,\n \"goals_per_match\" real\n);\n\nQuestion: What is the lowest rank that has goals per match less than 1.237, real madrid as the club, goals less than 53, with apps greater than 40?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"most_goals_in_a_season_all_competitions_\" WHERE \"goals_per_match\"<1.237 AND \"club\"='real madrid' AND \"goals\"<53 AND \"apps\">40;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birthstones_by_cultures\" (\n \"month\" text,\n \"15th_20th_century\" text,\n \"u_s_1912\" text,\n \"u_s_2013\" text,\n \"britain_2013\" text,\n \"hindu\" text\n);\n\nQuestion: What was Britain's (2013) birthstone when the U.S (2013) birthstone was ruby?"
},
{
"role": "assistant",
"content": "SELECT \"britain_2013\" FROM \"birthstones_by_cultures\" WHERE \"u_s_2013\"='ruby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birthstones_by_cultures\" (\n \"month\" text,\n \"15th_20th_century\" text,\n \"u_s_1912\" text,\n \"u_s_2013\" text,\n \"britain_2013\" text,\n \"hindu\" text\n);\n\nQuestion: What was the U.S birthstone in 1912 when in 2013 the birthstone was amethyst?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_1912\" FROM \"birthstones_by_cultures\" WHERE \"u_s_2013\"='amethyst';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birthstones_by_cultures\" (\n \"month\" text,\n \"15th_20th_century\" text,\n \"u_s_1912\" text,\n \"u_s_2013\" text,\n \"britain_2013\" text,\n \"hindu\" text\n);\n\nQuestion: What was the U.S birthstone in the 15th-20th century when in 2013 it was amethyst?"
},
{
"role": "assistant",
"content": "SELECT \"15th_20th_century\" FROM \"birthstones_by_cultures\" WHERE \"u_s_2013\"='amethyst';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birthstones_by_cultures\" (\n \"month\" text,\n \"15th_20th_century\" text,\n \"u_s_1912\" text,\n \"u_s_2013\" text,\n \"britain_2013\" text,\n \"hindu\" text\n);\n\nQuestion: Which month in 2013 did the U.S. use the ruby birthstone?"
},
{
"role": "assistant",
"content": "SELECT \"month\" FROM \"birthstones_by_cultures\" WHERE \"u_s_2013\"='ruby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birthstones_by_cultures\" (\n \"month\" text,\n \"15th_20th_century\" text,\n \"u_s_1912\" text,\n \"u_s_2013\" text,\n \"britain_2013\" text,\n \"hindu\" text\n);\n\nQuestion: In 1912 when the U.S used sapphire, what was the Hindu birthstone?"
},
{
"role": "assistant",
"content": "SELECT \"hindu\" FROM \"birthstones_by_cultures\" WHERE \"u_s_1912\"='sapphire';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appointed_delegates_to_various_internati\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"pageant\" text,\n \"result\" text,\n \"other_awards\" text\n);\n\nQuestion: What's the hometown of rachel muyot soriano?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"appointed_delegates_to_various_internati\" WHERE \"delegate\"='rachel muyot soriano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appointed_delegates_to_various_internati\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"pageant\" text,\n \"result\" text,\n \"other_awards\" text\n);\n\nQuestion: What's the latest year the miss internet www pageant had a result of second runner-up?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"appointed_delegates_to_various_internati\" WHERE \"pageant\"='miss internet www' AND \"result\"='second runner-up';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: On what Date is Tie no 19?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"third_round_proper\" WHERE \"tie_no\"='19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Ti no of the Walsall Home game?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"home_team\"='walsall';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of Tie no 21?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"third_round_proper\" WHERE \"tie_no\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_street_course\" (\n \"year\" real,\n \"drivers\" text,\n \"team\" text,\n \"duration_distance\" text,\n \"race_title\" text,\n \"championship\" text\n);\n\nQuestion: Which race happened in 1948?"
},
{
"role": "assistant",
"content": "SELECT \"race_title\" FROM \"first_street_course\" WHERE \"year\"=1948;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_street_course\" (\n \"year\" real,\n \"drivers\" text,\n \"team\" text,\n \"duration_distance\" text,\n \"race_title\" text,\n \"championship\" text\n);\n\nQuestion: Was the Grand Prix Watkins GLen that Miles Collier raced in before 1952 a championship?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"first_street_course\" WHERE \"year\"<1952 AND \"race_title\"='grand prix watkins glen' AND \"drivers\"='miles collier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_street_course\" (\n \"year\" real,\n \"drivers\" text,\n \"team\" text,\n \"duration_distance\" text,\n \"race_title\" text,\n \"championship\" text\n);\n\nQuestion: Who drove in races in 1949?"
},
{
"role": "assistant",
"content": "SELECT \"drivers\" FROM \"first_street_course\" WHERE \"year\"=1949;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sailing_1896_1968\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Total, when Silver is greater than 7, and when Gold is greater than 73?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"sailing_1896_1968\" WHERE \"silver\">7 AND \"gold\">73;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sailing_1896_1968\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is Total, when Silver is less than 65, when Bronze is greater than 4, and when Rank is \"4\"?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"sailing_1896_1968\" WHERE \"silver\"<65 AND \"bronze\">4 AND \"rank\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sailing_1896_1968\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Silver, when Gold is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"sailing_1896_1968\" WHERE \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is Height, when Name is \"Manuela Zanchi\"?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"italy\" WHERE \"name\"='manuela zanchi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"italy\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is Pos., when Height is \"m (ft 6in)\", and when Name is \"Martina Miceli\"?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"italy\" WHERE \"height\"='m (ft 6in)' AND \"name\"='martina miceli';"
}
]
|
[
{
"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\" real\n);\n\nQuestion: Which opponent has a week less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oceania_and_maritime_southeast_asia\" (\n \"perpetrator\" text,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text\n);\n\nQuestion: How many kills did basobas, florentino have?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"killed\") FROM \"oceania_and_maritime_southeast_asia\" WHERE \"perpetrator\"='basobas, florentino';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oceania_and_maritime_southeast_asia\" (\n \"perpetrator\" text,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text\n);\n\nQuestion: What is the average number of people killed with a Perpetrator of wirjo, 42?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"killed\") FROM \"oceania_and_maritime_southeast_asia\" WHERE \"perpetrator\"='wirjo, 42';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oceania_and_maritime_southeast_asia\" (\n \"perpetrator\" text,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text\n);\n\nQuestion: How many are injured in Borneo?"
},
{
"role": "assistant",
"content": "SELECT \"injured\" FROM \"oceania_and_maritime_southeast_asia\" WHERE \"location\"='borneo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_scorers\" (\n \"name\" text,\n \"hometown\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text,\n \"pen_min\" text\n);\n\nQuestion: How many points were scored by the player with 79 goals and who played 38 games?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"top_ten_scorers\" WHERE \"goals\"='79' AND \"games\"='38';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_scorers\" (\n \"name\" text,\n \"hometown\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text,\n \"pen_min\" text\n);\n\nQuestion: How many games were played by the player with 127 assists?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"top_ten_scorers\" WHERE \"assists\"='127';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_scorers\" (\n \"name\" text,\n \"hometown\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text,\n \"pen_min\" text\n);\n\nQuestion: How many games were played by the player who had 22 penalty minutes?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"top_ten_scorers\" WHERE \"pen_min\"='22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_scorers\" (\n \"name\" text,\n \"hometown\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text,\n \"pen_min\" text\n);\n\nQuestion: How many assists did the player with 54 penalty minutes have?"
},
{
"role": "assistant",
"content": "SELECT \"assists\" FROM \"top_ten_scorers\" WHERE \"pen_min\"='54';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_ten_scorers\" (\n \"name\" text,\n \"hometown\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text,\n \"pen_min\" text\n);\n\nQuestion: What is John Davis's home town?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"top_ten_scorers\" WHERE \"name\"='john davis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the date of the 1500m freestyle event?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men\" WHERE \"event\"='1500m freestyle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the nationality of the event with a 1:51.51 time?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"men\" WHERE \"time\"='1:51.51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the time of the 100m freestyle event?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"men\" WHERE \"event\"='100m freestyle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the date of the event with a 1:54.00 time?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men\" WHERE \"time\"='1:54.00';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What event is on 18 December 2009?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"men\" WHERE \"date\"='18 december 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"chr_chart_peak\" real,\n \"album\" text,\n \"composer_s\" text\n);\n\nQuestion: Jimmie Lee Sloas was the composer for what album?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"singles\" WHERE \"composer_s\"='jimmie lee sloas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"chr_chart_peak\" real,\n \"album\" text,\n \"composer_s\" text\n);\n\nQuestion: Which composer had a CHR chart peak at #2?"
},
{
"role": "assistant",
"content": "SELECT \"composer_s\" FROM \"singles\" WHERE \"chr_chart_peak\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_pool_games\" (\n \"week\" text,\n \"date\" text,\n \"home_team\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What was the date for Westport?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2008_pool_games\" WHERE \"venue\"='westport';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_pool_games\" (\n \"week\" text,\n \"date\" text,\n \"home_team\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What is the home team in week 1?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"2008_pool_games\" WHERE \"week\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_pool_games\" (\n \"week\" text,\n \"date\" text,\n \"home_team\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: In what week was the away team Auckland?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"2008_pool_games\" WHERE \"away_team\"='auckland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_pool_games\" (\n \"week\" text,\n \"date\" text,\n \"home_team\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What is the venue for week 1?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2008_pool_games\" WHERE \"week\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"victories_by_nationality\" (\n \"country\" text,\n \"men_s_open\" real,\n \"women_s_open\" real,\n \"men_s_wheelchair\" real,\n \"women_s_wheelchair\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of men's wheelchair from Ireland and more than 1 total?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"men_s_wheelchair\") FROM \"victories_by_nationality\" WHERE \"country\"='ireland' AND \"total\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"victories_by_nationality\" (\n \"country\" text,\n \"men_s_open\" real,\n \"women_s_open\" real,\n \"men_s_wheelchair\" real,\n \"women_s_wheelchair\" real,\n \"total\" real\n);\n\nQuestion: What is the average total for the Men's Open of 7, and the men's wheelchair more than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"victories_by_nationality\" WHERE \"men_s_open\"=7 AND \"men_s_wheelchair\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" text,\n \"title\" text,\n \"sales_certified\" text,\n \"certification_france\" text,\n \"peak_position\" text\n);\n\nQuestion: What is the title in 1991?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"singles\" WHERE \"year\"='1991';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: In what City/State did the ATCC Round 4 series take place?"
},
{
"role": "assistant",
"content": "SELECT \"city_state\" FROM \"race_calendar\" WHERE \"series\"='atcc round 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: In what City/State did the ATCC Round 4 series take place?"
},
{
"role": "assistant",
"content": "SELECT \"city_state\" FROM \"race_calendar\" WHERE \"series\"='atcc round 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which series was won by Paul Morris?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"race_calendar\" WHERE \"winner\"='paul morris';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: On which date did the Winfield Triple Challenge series take place?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"series\"='winfield triple challenge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What was the circuit for Team Peter Jackson Racing in the ATCC Round 4 series?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"team\"='peter jackson racing' AND \"series\"='atcc round 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2008/ 09 has a 1999/ 00 of non-ranking tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2008_09\" FROM \"performance_and_rankings_timeline\" WHERE \"1999_00\"='non-ranking tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 1999/ 00 has a 2001/ 02 of lq, a 2006/ 07 of qf, and a 2005/ 06 of 1r?"
},
{
"role": "assistant",
"content": "SELECT \"1999_00\" FROM \"performance_and_rankings_timeline\" WHERE \"2001_02\"='lq' AND \"2006_07\"='qf' AND \"2005_06\"='1r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2001/ 02 has a 2002/ 03 of tournament not held, a 2007/ 08 of tournament not held, and a 2008/ 09 of non-ranking?"
},
{
"role": "assistant",
"content": "SELECT \"2001_02\" FROM \"performance_and_rankings_timeline\" WHERE \"2002_03\"='tournament not held' AND \"2007_08\"='tournament not held' AND \"2008_09\"='non-ranking';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2006/ 07 has a 2011/ 12 of tournament not held, a 2005/ 06 of tournament not held, and a 2002/ 03 of 1r?"
},
{
"role": "assistant",
"content": "SELECT \"2006_07\" FROM \"performance_and_rankings_timeline\" WHERE \"2011_12\"='tournament not held' AND \"2005_06\"='tournament not held' AND \"2002_03\"='1r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2010/ 11 has a 2011/ 12 of former non-ranking tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2010_11\" FROM \"performance_and_rankings_timeline\" WHERE \"2011_12\"='former non-ranking tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2007/ 08 has a 2008/ 09 of tournament not held, a 2005/ 06 of tournament not held, and a 1999/ 00 of tournament not held?"
},
{
"role": "assistant",
"content": "SELECT \"2007_08\" FROM \"performance_and_rankings_timeline\" WHERE \"2008_09\"='tournament not held' AND \"2005_06\"='tournament not held' AND \"1999_00\"='tournament not held';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.