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 \"r\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_toronto\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player from United States who play in year 2003-06 in Toronto?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"r\" WHERE \"nationality\"='united states' AND \"years_in_toronto\"='2003-06';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan\" (\n \"place\" real,\n \"title\" text,\n \"platform\" text,\n \"publisher\" text,\n \"units_sold\" real\n);\n\nQuestion: Tell me the average units sold for square enix"
},
{
"role": "assistant",
"content": "SELECT AVG(\"units_sold\") FROM \"japan\" WHERE \"publisher\"='square enix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_wins_30\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Tell me the date for nicolas pereira"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_wins_30\" WHERE \"partnering\"='nicolas pereira';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: what is the date in 1986?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1980s\" WHERE \"year\"=1986;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the average year for Ponce, Puerto Rico events?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"venue\"='ponce, puerto rico';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What year did she place 8th in the junior race?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"event\"='junior race' AND \"position\"='8th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Tell me the NHL team for ryan johnson"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_two\" WHERE \"player\"='ryan johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Tell me the position for pick of 47"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_two\" WHERE \"pick\"='47';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Tell me the pick for pittsburgh penguins"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"round_two\" WHERE \"nhl_team\"='pittsburgh penguins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Tell me the nationality for rudolf vercik"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_two\" WHERE \"player\"='rudolf vercik';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Tell me the player for nationality of canada for pick of 43"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_two\" WHERE \"nationality\"='canada' AND \"pick\"='43';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Tell me the college for jason holland"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_two\" WHERE \"player\"='jason holland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the date for rudolf caracciola for avusrennen"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"non_championship_grands_prix\" WHERE \"winning_driver\"='rudolf caracciola' AND \"name\"='avusrennen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the circuit for 10 may for targa florio"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"non_championship_grands_prix\" WHERE \"date\"='10 may' AND \"name\"='targa florio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_36_14_22\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the Washington tournament?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_36_14_22\" WHERE \"tournament\"='washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_36_14_22\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: On what date was Patty Fendick an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_36_14_22\" WHERE \"opponent\"='patty fendick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What score does Vasil Levski National Stadium, Sofia earn?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='vasil levski national stadium, sofia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What score did vasil levski national stadium, sofia, which was friendly during competition, earn?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='friendly' AND \"venue\"='vasil levski national stadium, sofia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the nationality of the Washington Capitals?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_seven\" WHERE \"nhl_team\"='washington capitals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: On what NHL team does Roman Vopat play for?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_seven\" WHERE \"player\"='roman vopat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the position of the player from the Ukraine?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_seven\" WHERE \"nationality\"='ukraine';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What Tournament did he place 12th in?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"result\"='12th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What was the first year he placed 12th"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"result\"='12th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the circuit for alfa romeo swedish ice race"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='alfa romeo' AND \"name\"='swedish ice race';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the date for bugatti fpr stanislas czaykowski"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='bugatti' AND \"winning_driver\"='stanislas czaykowski';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the circuit for 20 august"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"other_grands_prix\" WHERE \"date\"='20 august';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the winning driver for avusrennen"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"name\"='avusrennen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the report for bugatti and brooklands"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='bugatti' AND \"circuit\"='brooklands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: How many years has there been a competition in Helsinki?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"1980_1989\" WHERE \"location\"='helsinki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which competition before 1982 had a score of 2:3?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"1980_1989\" WHERE \"year\"<1982 AND \"score\"='2:3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_1989\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which competition occurred after 1980 with a score of 0:5 in Jerusalem?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"1980_1989\" WHERE \"year\">1980 AND \"score\"='0:5' AND \"location\"='jerusalem';"
}
] |
[
{
"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 was there an attendance of 51,342?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='51,342';"
}
] |
[
{
"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: What was the attendance during week 7?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=7;"
}
] |
[
{
"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: What was the score during week 16?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_ghanaian_foreign_ministers\" (\n \"number\" real,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"government\" text,\n \"party\" text\n);\n\nQuestion: Who is the mInister who left office during 1960?"
},
{
"role": "assistant",
"content": "SELECT \"minister\" FROM \"list_of_ghanaian_foreign_ministers\" WHERE \"left_office\"='1960';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_ghanaian_foreign_ministers\" (\n \"number\" real,\n \"minister\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"government\" text,\n \"party\" text\n);\n\nQuestion: Which government is number 6?"
},
{
"role": "assistant",
"content": "SELECT \"government\" FROM \"list_of_ghanaian_foreign_ministers\" WHERE \"number\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970_isle_of_man_lightweight_tt_250cc_fi\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: Which rider had a speed of 90.57mph?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"1970_isle_of_man_lightweight_tt_250cc_fi\" WHERE \"speed\"='90.57mph';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970_isle_of_man_lightweight_tt_250cc_fi\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: Which country has a place smaller than 8 and points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"1970_isle_of_man_lightweight_tt_250cc_fi\" WHERE \"place\"<8 AND \"points\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"place\" real,\n \"team\" text,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"points\" text\n);\n\nQuestion: What is the lowest number of Losses when the number of Wins is less than 4, the number of Tie is 2, and the Place is 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"group_b\" WHERE \"wins\"<4 AND \"ties\"=2 AND \"place\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"season\" text,\n \"manager\" text,\n \"record_a\" text,\n \"win_pct\" real,\n \"post_season_record_e\" text,\n \"post_season_win_pct\" text,\n \"mlb_affiliate\" text\n);\n\nQuestion: Tell me the post-season record for kansas city"
},
{
"role": "assistant",
"content": "SELECT \"post_season_record_e\" FROM \"season_by_season_results\" WHERE \"mlb_affiliate\"='kansas city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the venue of 29 april 2007"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='29 april 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the competition of 20 august 2008"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='20 august 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the date of stade des martyrs, dr congo"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"venue\"='stade des martyrs, dr congo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finance\" (\n \"payee\" text,\n \"purpose\" text,\n \"amount_millions\" text,\n \"signatories\" text,\n \"date_signed\" text\n);\n\nQuestion: How much money, in millions, is paid to Infotalent?"
},
{
"role": "assistant",
"content": "SELECT \"amount_millions\" FROM \"finance\" WHERE \"payee\"='infotalent';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finance\" (\n \"payee\" text,\n \"purpose\" text,\n \"amount_millions\" text,\n \"signatories\" text,\n \"date_signed\" text\n);\n\nQuestion: What is the purpose of Euromarine?"
},
{
"role": "assistant",
"content": "SELECT \"purpose\" FROM \"finance\" WHERE \"payee\"='euromarine';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finance\" (\n \"payee\" text,\n \"purpose\" text,\n \"amount_millions\" text,\n \"signatories\" text,\n \"date_signed\" text\n);\n\nQuestion: What signatory has a purpose of police security and Infotalent payee?"
},
{
"role": "assistant",
"content": "SELECT \"signatories\" FROM \"finance\" WHERE \"purpose\"='police security' AND \"payee\"='infotalent';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oil_refining_and_petrochemical_facilitie\" (\n \"name\" text,\n \"location\" text,\n \"launched\" real,\n \"acquired\" text,\n \"capacity_mln_tpa\" text\n);\n\nQuestion: Tell me the highest launced for trn"
},
{
"role": "assistant",
"content": "SELECT MAX(\"launched\") FROM \"oil_refining_and_petrochemical_facilitie\" WHERE \"name\"='trn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oil_refining_and_petrochemical_facilitie\" (\n \"name\" text,\n \"location\" text,\n \"launched\" real,\n \"acquired\" text,\n \"capacity_mln_tpa\" text\n);\n\nQuestion: Tell me the average launced for capacity mln tpa of 15,0"
},
{
"role": "assistant",
"content": "SELECT AVG(\"launched\") FROM \"oil_refining_and_petrochemical_facilitie\" WHERE \"capacity_mln_tpa\"='15,0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"camp\" text,\n \"place\" text,\n \"province\" text,\n \"location\" text,\n \"period\" text\n);\n\nQuestion: Tell me the period for red rock"
},
{
"role": "assistant",
"content": "SELECT \"period\" FROM \"see_also\" WHERE \"place\"='red rock';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"camp\" text,\n \"place\" text,\n \"province\" text,\n \"location\" text,\n \"period\" text\n);\n\nQuestion: Tell me the province for 260km ese of calgary"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"see_also\" WHERE \"location\"='260km ese of calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"camp\" text,\n \"place\" text,\n \"province\" text,\n \"location\" text,\n \"period\" text\n);\n\nQuestion: Tell me the province of 1941-1946"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"see_also\" WHERE \"period\"='1941-1946';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nobel_laureate_alumni\" (\n \"name\" text,\n \"degree\" text,\n \"degree_year\" text,\n \"award_year\" real,\n \"award\" text\n);\n\nQuestion: Tell me the degree for degree year of 1983"
},
{
"role": "assistant",
"content": "SELECT \"degree\" FROM \"nobel_laureate_alumni\" WHERE \"degree_year\"='1983';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nobel_laureate_alumni\" (\n \"name\" text,\n \"degree\" text,\n \"degree_year\" text,\n \"award_year\" real,\n \"award\" text\n);\n\nQuestion: Tell me the degree for chemistry 1965"
},
{
"role": "assistant",
"content": "SELECT \"degree\" FROM \"nobel_laureate_alumni\" WHERE \"award_year\"=1965 AND \"award\"='chemistry';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_composition_of_the_2nd_parliamen\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"mp_s_term\" text,\n \"election_date\" text\n);\n\nQuestion: What is the MP's term who was elected from grey and bell?"
},
{
"role": "assistant",
"content": "SELECT \"mp_s_term\" FROM \"initial_composition_of_the_2nd_parliamen\" WHERE \"electorate\"='grey and bell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_composition_of_the_2nd_parliamen\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"mp_s_term\" text,\n \"election_date\" text\n);\n\nQuestion: What is the Election date for Member william richmond category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"election_date\" FROM \"initial_composition_of_the_2nd_parliamen\" WHERE \"member\"='william richmond category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_composition_of_the_2nd_parliamen\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"mp_s_term\" text,\n \"election_date\" text\n);\n\nQuestion: What is Member alfred east category:articles with hcards's term?"
},
{
"role": "assistant",
"content": "SELECT \"mp_s_term\" FROM \"initial_composition_of_the_2nd_parliamen\" WHERE \"member\"='alfred east category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_composition_of_the_2nd_parliamen\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"mp_s_term\" text,\n \"election_date\" text\n);\n\nQuestion: What is the election date for the city of auckland category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"election_date\" FROM \"initial_composition_of_the_2nd_parliamen\" WHERE \"electorate\"='city of auckland category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_composition_of_the_2nd_parliamen\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"mp_s_term\" text,\n \"election_date\" text\n);\n\nQuestion: What electorate does Member dingley brittin category:articles with hcards represent?"
},
{
"role": "assistant",
"content": "SELECT \"electorate\" FROM \"initial_composition_of_the_2nd_parliamen\" WHERE \"member\"='dingley brittin category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_composition_of_the_2nd_parliamen\" (\n \"member\" text,\n \"electorate\" text,\n \"province\" text,\n \"mp_s_term\" text,\n \"election_date\" text\n);\n\nQuestion: What is the election date for the electorate of member charles brown category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"election_date\" FROM \"initial_composition_of_the_2nd_parliamen\" WHERE \"member\"='charles brown category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"date\" text,\n \"event\" text,\n \"days\" text,\n \"stages\" text,\n \"acts\" text\n);\n\nQuestion: Tell me the date for acts of 6 bands and year larger than 1981 for monsters of rock"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1980s\" WHERE \"acts\"='6 bands' AND \"year\">1981 AND \"event\"='monsters of rock';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"date\" text,\n \"event\" text,\n \"days\" text,\n \"stages\" text,\n \"acts\" text\n);\n\nQuestion: Tell me the stages for 1981"
},
{
"role": "assistant",
"content": "SELECT \"stages\" FROM \"1980s\" WHERE \"year\"=1981;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980s\" (\n \"year\" real,\n \"date\" text,\n \"event\" text,\n \"days\" text,\n \"stages\" text,\n \"acts\" text\n);\n\nQuestion: Tell me the event for 6 bands"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"1980s\" WHERE \"acts\"='6 bands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"popular_languages_used_for_data_exchange\" (\n \"schemas\" text,\n \"flexible\" text,\n \"semantic_verification\" text,\n \"dictionary\" text,\n \"information_model\" text,\n \"synonyms_and_homonyms\" text,\n \"dialecting\" text,\n \"web_standard\" text,\n \"transformations\" text,\n \"lightweight\" text,\n \"human_readable\" text\n);\n\nQuestion: What is the lightweight value with no information model and the flexible value is unknown?"
},
{
"role": "assistant",
"content": "SELECT \"lightweight\" FROM \"popular_languages_used_for_data_exchange\" WHERE \"information_model\"='no' AND \"flexible\"='unknown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"solo\" (\n \"year\" real,\n \"title\" text,\n \"u_s\" text,\n \"u_s_r_b\" text,\n \"u_s_dance\" text\n);\n\nQuestion: What value for U.S. dance occurred in 1986 when the value of U.S. R&B was 9?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_dance\" FROM \"solo\" WHERE \"year\"=1986 AND \"u_s_r_b\"='9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"salmson_post_world_war_one_engines\" (\n \"name\" text,\n \"cyl\" text,\n \"bore\" text,\n \"capacity\" text,\n \"power\" text,\n \"weight\" text\n);\n\nQuestion: What is the bore for a 9-cyl radial on a 9 AD?"
},
{
"role": "assistant",
"content": "SELECT \"bore\" FROM \"salmson_post_world_war_one_engines\" WHERE \"cyl\"='9-cyl radial' AND \"name\"='9 ad';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"salmson_post_world_war_one_engines\" (\n \"name\" text,\n \"cyl\" text,\n \"bore\" text,\n \"capacity\" text,\n \"power\" text,\n \"weight\" text\n);\n\nQuestion: What bore goes with an 18 AB?"
},
{
"role": "assistant",
"content": "SELECT \"bore\" FROM \"salmson_post_world_war_one_engines\" WHERE \"name\"='18 ab';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Tell me the venue for notes of 10.93 secs"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"major_achievements\" WHERE \"notes\"='10.93 secs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Tell me the venue for year less than 2003"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"major_achievements\" WHERE \"year\"<2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team_chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of points team Alfa Romeo 184T won?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_results\" WHERE \"team_chassis\"='alfa romeo 184t';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team_chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What engine was used after 1984?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"year\">1984;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team_chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: In which year were the points more than 0?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"complete_formula_one_results\" WHERE \"points\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"team_chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"points\" real\n);\n\nQuestion: What were the Tyres after 1984?"
},
{
"role": "assistant",
"content": "SELECT \"tyres\" FROM \"complete_formula_one_results\" WHERE \"year\">1984;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"binary_azeotropes\" (\n \"component_1\" text,\n \"b_p_comp_1_c\" text,\n \"component_2\" text,\n \"b_p_comp_2_c\" text,\n \"b_p_azeo_c\" text,\n \"pct_wt_comp_1\" real,\n \"pct_wt_comp_2\" real\n);\n\nQuestion: Tell me the bp comp 2 for % wt comp 1 of 76"
},
{
"role": "assistant",
"content": "SELECT \"b_p_comp_2_c\" FROM \"binary_azeotropes\" WHERE \"pct_wt_comp_1\"=76;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"binary_azeotropes\" (\n \"component_1\" text,\n \"b_p_comp_1_c\" text,\n \"component_2\" text,\n \"b_p_comp_2_c\" text,\n \"b_p_azeo_c\" text,\n \"pct_wt_comp_1\" real,\n \"pct_wt_comp_2\" real\n);\n\nQuestion: Tell me the total number of % wt comp 1 foR % wt comp 2 or 27"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pct_wt_comp_1\") FROM \"binary_azeotropes\" WHERE \"pct_wt_comp_2\"=27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"year_of_election\" real,\n \"candidates_elected\" real,\n \"num_of_seats_available\" real,\n \"num_of_votes\" text,\n \"pct_of_popular_vote\" text\n);\n\nQuestion: What is the percentage of the popular vote when there were 90 seats available?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_popular_vote\" FROM \"election_results\" WHERE \"num_of_seats_available\"=90;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_by_country\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the gold for silver of 39"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medals_by_country\" WHERE \"silver\"=39;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1973_engines\" (\n \"engine\" text,\n \"horsepower\" text,\n \"torque\" text,\n \"carburetor\" text,\n \"compression_ratio\" text,\n \"bore_stroke\" text,\n \"vin_code\" text\n);\n\nQuestion: What is the compression ratio for the 302-2v Windsor v8 engine?"
},
{
"role": "assistant",
"content": "SELECT \"compression_ratio\" FROM \"1973_engines\" WHERE \"engine\"='302-2v windsor v8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_rushing_statistics_at_ohio_state\" (\n \"year\" text,\n \"games\" real,\n \"rushes\" real,\n \"yards\" real,\n \"average\" real\n);\n\nQuestion: How many games had 41 rushes and were than 197 yards?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"career_rushing_statistics_at_ohio_state\" WHERE \"rushes\"=41 AND \"yards\"<197;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_rushing_statistics_at_ohio_state\" (\n \"year\" text,\n \"games\" real,\n \"rushes\" real,\n \"yards\" real,\n \"average\" real\n);\n\nQuestion: What was the highest number of yards in years where there were fewer than 51 rushes and more than 12 games?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"yards\") FROM \"career_rushing_statistics_at_ohio_state\" WHERE \"rushes\"<51 AND \"games\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What is the pick # for Dimelon Westfield?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"round_three\" WHERE \"player\"='dimelon westfield';"
}
] |
[
{
"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 \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"overall\" text,\n \"conf\" text\n);\n\nQuestion: What was the final score of the November 8, 2001 game?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule_and_results\" WHERE \"date\"='november 8, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"headstamps_and_colour_coding\" (\n \"headstamp_id\" text,\n \"primer_annulus_color\" text,\n \"bullet_tip_color\" text,\n \"other_features\" text,\n \"functional_type\" text\n);\n\nQuestion: Tell me the bullet tip color of headstamp id of h1z"
},
{
"role": "assistant",
"content": "SELECT \"bullet_tip_color\" FROM \"headstamps_and_colour_coding\" WHERE \"headstamp_id\"='h1z';"
}
] |
[
{
"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: Tell me the total number of gold for bronze more than 0 and total more than 100"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"bronze\">0 AND \"rank\"='total' AND \"total\">100;"
}
] |
[
{
"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: Tell me the least silver for total less than 6 and rank of 8"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"total\"<6 AND \"rank\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text\n);\n\nQuestion: Who played men's singles in 1951?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_singles\" FROM \"winners\" WHERE \"year\"='1951';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text\n);\n\nQuestion: Who played women's singles in 1955?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"winners\" WHERE \"year\"='1955';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text\n);\n\nQuestion: Who played Women's singles when xiong guobao played men's singles, and tian bingyi li yongbo played Men's doubles?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"winners\" WHERE \"men_s_singles\"='xiong guobao' AND \"men_s_doubles\"='tian bingyi li yongbo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text\n);\n\nQuestion: Who played men's doubles when gao ling huang sui played women's doubles in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"winners\" WHERE \"women_s_doubles\"='gao ling huang sui' AND \"year\"='2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text\n);\n\nQuestion: What year did huang nanyan yang wei play women's doubles and Men's doubles was played by lee dong-soo yoo yong-sung?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners\" WHERE \"women_s_doubles\"='huang nanyan yang wei' AND \"men_s_doubles\"='lee dong-soo yoo yong-sung';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text\n);\n\nQuestion: Who played men's doubles when men's singles were played by wong peng soon and Women's singles was played by cecilia samuel, in 1952?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"winners\" WHERE \"men_s_singles\"='wong peng soon' AND \"women_s_singles\"='cecilia samuel' AND \"year\"='1952';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the first leg score in that match where Marseille was the first team?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"round_of_16\" WHERE \"team_1\"='marseille';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_table_of_homo_species_view_t\" (\n \"species\" text,\n \"lived_when_mya\" text,\n \"lived_where\" text,\n \"fossil_record\" text,\n \"discovery_publication_of_name\" text\n);\n\nQuestion: Tell me the discovery/publication for still living"
},
{
"role": "assistant",
"content": "SELECT \"discovery_publication_of_name\" FROM \"comparative_table_of_homo_species_view_t\" WHERE \"fossil_record\"='still living';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_table_of_homo_species_view_t\" (\n \"species\" text,\n \"lived_when_mya\" text,\n \"lived_where\" text,\n \"fossil_record\" text,\n \"discovery_publication_of_name\" text\n);\n\nQuestion: Tell me the discovery/publication for red deer cave people"
},
{
"role": "assistant",
"content": "SELECT \"discovery_publication_of_name\" FROM \"comparative_table_of_homo_species_view_t\" WHERE \"species\"='red deer cave people';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_table_of_homo_species_view_t\" (\n \"species\" text,\n \"lived_when_mya\" text,\n \"lived_where\" text,\n \"fossil_record\" text,\n \"discovery_publication_of_name\" text\n);\n\nQuestion: Tell me the discovery/publicatio of name for h.heidelbergensis"
},
{
"role": "assistant",
"content": "SELECT \"discovery_publication_of_name\" FROM \"comparative_table_of_homo_species_view_t\" WHERE \"species\"='h.heidelbergensis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_table_of_homo_species_view_t\" (\n \"species\" text,\n \"lived_when_mya\" text,\n \"lived_where\" text,\n \"fossil_record\" text,\n \"discovery_publication_of_name\" text\n);\n\nQuestion: Tell me the fossil record for name of 1994/2003"
},
{
"role": "assistant",
"content": "SELECT \"fossil_record\" FROM \"comparative_table_of_homo_species_view_t\" WHERE \"discovery_publication_of_name\"='1994/2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_table_of_homo_species_view_t\" (\n \"species\" text,\n \"lived_when_mya\" text,\n \"lived_where\" text,\n \"fossil_record\" text,\n \"discovery_publication_of_name\" text\n);\n\nQuestion: Tell me lived for name of 1994/2003"
},
{
"role": "assistant",
"content": "SELECT \"lived_when_mya\" FROM \"comparative_table_of_homo_species_view_t\" WHERE \"discovery_publication_of_name\"='1994/2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: When was the Monza circuit?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"european_championship_grands_prix\" WHERE \"circuit\"='monza';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" text,\n \"round_of_32\" text,\n \"elite_eight\" text,\n \"final_four\" text,\n \"championship_game\" text\n);\n\nQuestion: What is Metro's win percentage?"
},
{
"role": "assistant",
"content": "SELECT \"win_pct\" FROM \"record_by_conference\" WHERE \"conference\"='metro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" text,\n \"round_of_32\" text,\n \"elite_eight\" text,\n \"final_four\" text,\n \"championship_game\" text\n);\n\nQuestion: How many elite eight teams came from the Atlantic 10?"
},
{
"role": "assistant",
"content": "SELECT \"elite_eight\" FROM \"record_by_conference\" WHERE \"conference\"='atlantic 10';"
}
] |
[
{
"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: Tell me the opponent for attendance of 55,527"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='55,527';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.