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 \"matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What's the 2nd leg for team 2 san francisco?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"matches\" WHERE \"team_2\"='san francisco';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What's the 1st leg of team 1 alajuelense?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"matches\" WHERE \"team_1\"='alajuelense';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"year\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What was the format for catalog 660-51-015?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='660-51-015';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"year\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which region had the year May 1974?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"year\"='may 1974';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"year\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which region had a year March 10, 1998?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"year\"='march 10, 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1707_1868\" (\n \"year\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: What is the first party for Lord John Hay earlier than 1857?"
},
{
"role": "assistant",
"content": "SELECT \"first_party\" FROM \"m_ps_1707_1868\" WHERE \"year\"<1857 AND \"first_member\"='lord john hay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1707_1868\" (\n \"year\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Who is the second member more recently than 1790 when John Williams is the first member?"
},
{
"role": "assistant",
"content": "SELECT \"second_member\" FROM \"m_ps_1707_1868\" WHERE \"year\">1790 AND \"first_member\"='john williams';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1707_1868\" (\n \"year\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Who is the second member ewarlier than 1804 when Tory Henry Isherwood is the first member?"
},
{
"role": "assistant",
"content": "SELECT \"second_member\" FROM \"m_ps_1707_1868\" WHERE \"first_party\"='tory' AND \"year\"<1804 AND \"first_member\"='henry isherwood';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1707_1868\" (\n \"year\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Who is the second member when RT Hon. Edward Stanley is the first member?"
},
{
"role": "assistant",
"content": "SELECT \"second_member\" FROM \"m_ps_1707_1868\" WHERE \"first_member\"='rt hon. edward stanley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1707_1868\" (\n \"year\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: What is the second party where the first party is Tory and the year is 1820?"
},
{
"role": "assistant",
"content": "SELECT \"second_party\" FROM \"m_ps_1707_1868\" WHERE \"first_party\"='tory' AND \"year\"=1820;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Who is the player who won in 1993?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1993';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What years did the player with a t71 finish win?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"finish\"='t71';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What year did player payne stewart win?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"player\"='payne stewart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What year did the player with a t3 finish win?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"finish\"='t3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the lowest total of the player with a t41 finish?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t41';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medieval_bulgarian_army\" (\n \"battle\" text,\n \"date\" text,\n \"bulgarian_commander\" text,\n \"byzantine_commander\" text,\n \"result\" text\n);\n\nQuestion: In what Battle was Bulgarian Commander of Gavril Radomir?"
},
{
"role": "assistant",
"content": "SELECT \"battle\" FROM \"medieval_bulgarian_army\" WHERE \"bulgarian_commander\"='gavril radomir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medieval_bulgarian_army\" (\n \"battle\" text,\n \"date\" text,\n \"bulgarian_commander\" text,\n \"byzantine_commander\" text,\n \"result\" text\n);\n\nQuestion: What is the Date of the Bulgarian Victory at the Battle of Arcadiopolis?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"medieval_bulgarian_army\" WHERE \"result\"='bulgarian victory' AND \"battle\"='battle of arcadiopolis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medieval_bulgarian_army\" (\n \"battle\" text,\n \"date\" text,\n \"bulgarian_commander\" text,\n \"byzantine_commander\" text,\n \"result\" text\n);\n\nQuestion: What is the Bulgarian Commander in Autumn 1040 at the Battle of Thessalonica?"
},
{
"role": "assistant",
"content": "SELECT \"bulgarian_commander\" FROM \"medieval_bulgarian_army\" WHERE \"battle\"='battle of thessalonica' AND \"date\"='autumn 1040';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medieval_bulgarian_army\" (\n \"battle\" text,\n \"date\" text,\n \"bulgarian_commander\" text,\n \"byzantine_commander\" text,\n \"result\" text\n);\n\nQuestion: What is the Byzantine Commander with a Bulgarian Victory at the Siege of Lovech?"
},
{
"role": "assistant",
"content": "SELECT \"byzantine_commander\" FROM \"medieval_bulgarian_army\" WHERE \"result\"='bulgarian victory' AND \"battle\"='siege of lovech';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medieval_bulgarian_army\" (\n \"battle\" text,\n \"date\" text,\n \"bulgarian_commander\" text,\n \"byzantine_commander\" text,\n \"result\" text\n);\n\nQuestion: What is the Result of the Battle of Marcellae in 756?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"medieval_bulgarian_army\" WHERE \"battle\"='battle of marcellae' AND \"date\"='756';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medieval_bulgarian_army\" (\n \"battle\" text,\n \"date\" text,\n \"bulgarian_commander\" text,\n \"byzantine_commander\" text,\n \"result\" text\n);\n\nQuestion: What is the date of Gavril Radomir's Bulgarian Victory?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"medieval_bulgarian_army\" WHERE \"result\"='bulgarian victory' AND \"bulgarian_commander\"='gavril radomir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" text,\n \"1_season\" text,\n \"2_season\" text,\n \"3_season\" text,\n \"4_season\" text,\n \"5_season\" text,\n \"6_season\" text\n);\n\nQuestion: What is 3 Season, when 1 Season is \"2 959 699\"?"
},
{
"role": "assistant",
"content": "SELECT \"3_season\" FROM \"rating_figures\" WHERE \"1_season\"='2 959 699';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" text,\n \"1_season\" text,\n \"2_season\" text,\n \"3_season\" text,\n \"4_season\" text,\n \"5_season\" text,\n \"6_season\" text\n);\n\nQuestion: What is 1 Season, when 4 Season is \"2 101 043 (13 May 2009)\"?"
},
{
"role": "assistant",
"content": "SELECT \"1_season\" FROM \"rating_figures\" WHERE \"4_season\"='2 101 043 (13 may 2009)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" text,\n \"1_season\" text,\n \"2_season\" text,\n \"3_season\" text,\n \"4_season\" text,\n \"5_season\" text,\n \"6_season\" text\n);\n\nQuestion: What is 5 Season, when 2 Season is \"3 168 673 (2 April 2008)\"?"
},
{
"role": "assistant",
"content": "SELECT \"5_season\" FROM \"rating_figures\" WHERE \"2_season\"='3 168 673 (2 april 2008)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" text,\n \"1_season\" text,\n \"2_season\" text,\n \"3_season\" text,\n \"4_season\" text,\n \"5_season\" text,\n \"6_season\" text\n);\n\nQuestion: What is 4 Season, when 2 Season is \"3 168 673 (2 April 2008)\"?"
},
{
"role": "assistant",
"content": "SELECT \"4_season\" FROM \"rating_figures\" WHERE \"2_season\"='3 168 673 (2 april 2008)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" text,\n \"1_season\" text,\n \"2_season\" text,\n \"3_season\" text,\n \"4_season\" text,\n \"5_season\" text,\n \"6_season\" text\n);\n\nQuestion: What is 3 Season, when 4 Season is \"2 628 383 (3 June 2009)\"?"
},
{
"role": "assistant",
"content": "SELECT \"3_season\" FROM \"rating_figures\" WHERE \"4_season\"='2 628 383 (3 june 2009)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" text,\n \"1_season\" text,\n \"2_season\" text,\n \"3_season\" text,\n \"4_season\" text,\n \"5_season\" text,\n \"6_season\" text\n);\n\nQuestion: What is 1st Season, when 4 Season is \"3 273 440 (17 March 2009)\"?"
},
{
"role": "assistant",
"content": "SELECT \"1_season\" FROM \"rating_figures\" WHERE \"4_season\"='3 273 440 (17 march 2009)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_top_25_outdoors\" (\n \"rank\" real,\n \"res\" text,\n \"wind\" text,\n \"athlete\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What was the wind at New York City when the rank was smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT \"wind\" FROM \"all_time_top_25_outdoors\" WHERE \"rank\"<6 AND \"location\"='new york city';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_top_25_outdoors\" (\n \"rank\" real,\n \"res\" text,\n \"wind\" text,\n \"athlete\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What was the highest rink for Kingston?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"all_time_top_25_outdoors\" WHERE \"location\"='kingston';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the average first elected for the district South Carolina 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"first_elected\") FROM \"south_carolina\" WHERE \"district\"='south carolina 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Who was the first elected for the republican party?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"south_carolina\" WHERE \"party\"='republican';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What party has the South Carolina 2 district?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"district\"='south carolina 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is the type for Cassano?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"in\" WHERE \"name\"='cassano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What nationality is Diogo?"
},
{
"role": "assistant",
"content": "SELECT \"nat\" FROM \"in\" WHERE \"name\"='diogo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name of the player with a winter transfer window moving from Roma?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"in\" WHERE \"transfer_window\"='winter' AND \"moving_from\"='roma';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_effects\" (\n \"name\" text,\n \"dates_active\" text,\n \"windspeeds\" text,\n \"pressure\" text,\n \"deaths\" text\n);\n\nQuestion: What pressure is Ken?"
},
{
"role": "assistant",
"content": "SELECT \"pressure\" FROM \"season_effects\" WHERE \"name\"='ken';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: In which round was Barbara Hawcroft the loser?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"women\" WHERE \"loser\"='barbara hawcroft';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: In which year is Nerida Gregory listed as the loser?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"women\" WHERE \"loser\"='nerida gregory';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: In which year did Misaki Doi lose the Australian Open Grand Slam?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"women\" WHERE \"grand_slam\"='australian open' AND \"loser\"='misaki doi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"puchat_ligi\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which Polish Cup has a Puchat Ligi larger than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"polish_cup\") FROM \"top_scorers\" WHERE \"puchat_ligi\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"puchat_ligi\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which Player has a Total of 3, and an Ekstraklasa smaller than 3, and a UEFA Cup of 2?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"top_scorers\" WHERE \"total\"=3 AND \"ekstraklasa\"<3 AND \"uefa_cup\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"puchat_ligi\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which Puchat Ligi has a UEFA Cup smaller than 2, and a Player of takesure chinyama?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"puchat_ligi\") FROM \"top_scorers\" WHERE \"uefa_cup\"<2 AND \"player\"='takesure chinyama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"puchat_ligi\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: How much Ekstraklasa has a Total smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"ekstraklasa\") FROM \"top_scorers\" WHERE \"total\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"puchat_ligi\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: How much Puchat Ligi has a Total smaller than 5, and an Ekstraklasa larger than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"puchat_ligi\") FROM \"top_scorers\" WHERE \"total\"<5 AND \"ekstraklasa\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which player has a to par greater than 11, with a total less than 155?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"to_par\">11 AND \"total\"<155;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What country has a to par less than 13, with wayne grady as the player?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"to_par\"<13 AND \"player\"='wayne grady';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: Which Points 1 has Drawn of 5, and a Goal Difference of +58, and a Lost larger than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points_1\") FROM \"third_division_final_table\" WHERE \"drawn\"=5 AND \"goal_difference\"='+58' AND \"lost\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: Which Lost has Goals Against larger than 92?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"third_division_final_table\" WHERE \"goals_against\">92;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: Which Points 1 has a Team of atherton collieries, and a Position smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points_1\") FROM \"third_division_final_table\" WHERE \"team\"='atherton collieries' AND \"position\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: How much Played has a Position of 7, and a Drawn smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"third_division_final_table\" WHERE \"position\"=7 AND \"drawn\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: How much Drawn has Points 1 of 51, and a Lost larger than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"drawn\") FROM \"third_division_final_table\" WHERE \"points_1\"=51 AND \"lost\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet_history\" (\n \"aircraft\" text,\n \"introduced\" real,\n \"retired\" text,\n \"seating\" text,\n \"notes\" text\n);\n\nQuestion: When was the aircraft introduced that could seat 115 people?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"introduced\") FROM \"fleet_history\" WHERE \"seating\"='115';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet_history\" (\n \"aircraft\" text,\n \"introduced\" real,\n \"retired\" text,\n \"seating\" text,\n \"notes\" text\n);\n\nQuestion: What year was the aircraft retired when it was replaced by 737-300s?"
},
{
"role": "assistant",
"content": "SELECT \"retired\" FROM \"fleet_history\" WHERE \"notes\"='replaced by 737-300s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet_history\" (\n \"aircraft\" text,\n \"introduced\" real,\n \"retired\" text,\n \"seating\" text,\n \"notes\" text\n);\n\nQuestion: What aircraft was introduced in 2004 and has a retired of \u2014?"
},
{
"role": "assistant",
"content": "SELECT \"aircraft\" FROM \"fleet_history\" WHERE \"retired\"='\u2014' AND \"introduced\"=2004;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet_history\" (\n \"aircraft\" text,\n \"introduced\" real,\n \"retired\" text,\n \"seating\" text,\n \"notes\" text\n);\n\nQuestion: Which aircraft has 148/9 seating?"
},
{
"role": "assistant",
"content": "SELECT \"aircraft\" FROM \"fleet_history\" WHERE \"seating\"='148/9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet_history\" (\n \"aircraft\" text,\n \"introduced\" real,\n \"retired\" text,\n \"seating\" text,\n \"notes\" text\n);\n\nQuestion: How many people can be seated on the aircraft that was introduced in 2008 and has notes of in service?"
},
{
"role": "assistant",
"content": "SELECT \"seating\" FROM \"fleet_history\" WHERE \"notes\"='in service' AND \"introduced\"=2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"previous_team\" text,\n \"years_of_nba_experience_a\" real,\n \"career_with_the_franchise\" text\n);\n\nQuestion: What is the nationality of the player who was previously with the Detroit Pistons?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"selections\" WHERE \"previous_team\"='detroit pistons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"previous_team\" text,\n \"years_of_nba_experience_a\" real,\n \"career_with_the_franchise\" text\n);\n\nQuestion: What is the career with the franchise of the f/c player with fewer than 9 years of NBA experience who previously played for the Phoenix Suns?"
},
{
"role": "assistant",
"content": "SELECT \"career_with_the_franchise\" FROM \"selections\" WHERE \"years_of_nba_experience_a\"<9 AND \"pos\"='f/c' AND \"previous_team\"='phoenix suns';"
}
]
|
[
{
"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 was the tie number when Bournemouth was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"home_team\"='bournemouth';"
}
]
|
[
{
"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: Who was the away team when the home team was Norwich City?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"home_team\"='norwich city';"
}
]
|
[
{
"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: On what date was Wimbledon the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"home_team\"='wimbledon';"
}
]
|
[
{
"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: On what date was the away team West Ham United?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"away_team\"='west ham united';"
}
]
|
[
{
"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: On what date was the away team Bournemouth?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"away_team\"='bournemouth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" real,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"electorates_2011\" real\n);\n\nQuestion: What district has abhayapuri south as the name?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"name\"='abhayapuri south';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Bronze has a Gold larger than 1, and a Silver smaller than 3, and a Rank smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"performances_by_nation\" WHERE \"gold\">1 AND \"silver\"<3 AND \"rank\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Rank has a Gold larger than 1, and a Bronze of 4, and a Silver smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"performances_by_nation\" WHERE \"gold\">1 AND \"bronze\"=4 AND \"silver\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Rank has a Gold of 3, and a Bronze of 4, and a Total larger than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"performances_by_nation\" WHERE \"gold\"=3 AND \"bronze\"=4 AND \"total\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Total has a Rank smaller than 10, and a Silver larger than 3, and a Gold larger than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"performances_by_nation\" WHERE \"rank\"<10 AND \"silver\">3 AND \"gold\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Rank of 9, and a Silver smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"performances_by_nation\" WHERE \"rank\"=9 AND \"silver\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What event had Xu Zhilin competing?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"medalists\" WHERE \"name\"='xu zhilin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What sport has Ma Yuxi in it?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"medalists\" WHERE \"name\"='ma yuxi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_showing_prize_winners_from_the_cle\" (\n \"year\" real,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text\n);\n\nQuestion: How many years is Antonio Pompa-Baldi Italy first?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"table_showing_prize_winners_from_the_cle\" WHERE \"first\"='antonio pompa-baldi italy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_showing_prize_winners_from_the_cle\" (\n \"year\" real,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text\n);\n\nQuestion: Who is fourth when Anders Martinson USA is second?"
},
{
"role": "assistant",
"content": "SELECT \"fourth\" FROM \"table_showing_prize_winners_from_the_cle\" WHERE \"second\"='anders martinson usa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: Can you tell me the sum of Wins that has the Club of abuls smiltene, and the Goals smaller than 18?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"league_standings\" WHERE \"club\"='abuls smiltene' AND \"goals_for\"<18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"league_standings\" WHERE \"goal_difference\">-24 AND \"draws\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: Can you tell me the highest Draws that has the Goal Difference smaller than 64, and the Played larger than 30?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draws\") FROM \"league_standings\" WHERE \"goal_difference\"<64 AND \"played\">30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: Can you tell me the highest Points that has the Played smaller than 30?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"league_standings\" WHERE \"played\"<30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What rank was the country with no bronze but at least 1 silver medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"medal_count\" WHERE \"bronze\"<1 AND \"silver\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest number of gold medals a country with 1 bronze, and a total of 3 medals which is lower than rank 7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_count\" WHERE \"bronze\"=1 AND \"total\"=3 AND \"rank\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest number of gold medals a country with 7 medals has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_count\" WHERE \"total\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"venues\" (\n \"games\" text,\n \"year\" real,\n \"host_city\" text,\n \"province\" text,\n \"dates\" text\n);\n\nQuestion: Can you tell me the Host City that has the Games of vii?"
},
{
"role": "assistant",
"content": "SELECT \"host_city\" FROM \"venues\" WHERE \"games\"='vii';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What was the nominated work after 2006, that was awarded the Drama Desk award and the Outstanding featured actor in a musical?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"year\">2006 AND \"award\"='drama desk award' AND \"category\"='outstanding featured actor in a musical';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What year was Evita nominated for outstanding featured actor in a musical?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"awards_and_nominations\" WHERE \"category\"='outstanding featured actor in a musical' AND \"nominated_work\"='evita';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What was the nominated work, nominated for the drama league award before 2007?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"result\"='nominated' AND \"award\"='drama league award' AND \"year\"<2007;"
}
]
|
[
{
"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 \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who had the pole position on 7 August?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"race_calendar_and_winners\" WHERE \"date\"='7 august';"
}
]
|
[
{
"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 \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who was the winning team at Zandvoort?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"race_calendar_and_winners\" WHERE \"circuit\"='zandvoort';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Losses have Wins smaller than 6, and a South West DFL of sandford?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"2010_ladder\" WHERE \"wins\"<6 AND \"south_west_dfl\"='sandford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How much Against has Draws of 2, and Losses smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2010_ladder\" WHERE \"draws\"=2 AND \"losses\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"south_west_dfl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Losses have South West DFL of coleraine, and an Against smaller than 891?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2010_ladder\" WHERE \"south_west_dfl\"='coleraine' AND \"against\"<891;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest played number when goals for is 47, and wins is smaller than 14?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"group_i\" WHERE \"goals_for\"=47 AND \"wins\"<14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What Club has 13 wins, goals against less than 48, and a position of 4?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"group_i\" WHERE \"wins\"=13 AND \"goals_against\"<48 AND \"position\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest position number when goals against was 59, and a goals for is smaller than 24?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"position\") FROM \"group_i\" WHERE \"goals_against\"=59 AND \"goals_for\"<24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the highest goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_against\") FROM \"group_i\" WHERE \"points\">31 AND \"goal_difference\"<9 AND \"wins\"=13 AND \"draws\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest played number when points are larger than 32, and a wins are larger than 18?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"group_i\" WHERE \"points\">32 AND \"wins\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Can you tell me the highest Against that has the Status of six nations, and the Date of 02/03/2002?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"2002\" WHERE \"status\"='six nations' AND \"date\"='02/03/2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Can you tell me the average Against thaylt has the Date of 23/03/2002?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"2002\" WHERE \"date\"='23/03/2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" text,\n \"density\" text\n);\n\nQuestion: What is the population of area of 11?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"subdivisions\" WHERE \"area\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" text,\n \"density\" text\n);\n\nQuestion: What shows for traditional when the population was 44,803?"
},
{
"role": "assistant",
"content": "SELECT \"traditional\" FROM \"subdivisions\" WHERE \"population\"='44,803';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" text,\n \"density\" text\n);\n\nQuestion: What is the population when the area is 4,575?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"subdivisions\" WHERE \"area\"='4,575';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" text,\n \"density\" text\n);\n\nQuestion: What shows for simplified when the density is 52?"
},
{
"role": "assistant",
"content": "SELECT \"simplified\" FROM \"subdivisions\" WHERE \"density\"='52';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.