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 \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What was the record setting time in the 800m freestyle?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"men\" WHERE \"event\"='800m freestyle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_premiers\" (\n \"rank\" real,\n \"state\" text,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What is the least rank for the premier that assumed office on 17 may 1919 and was in office for 7 years, 335 days?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"historical_premiers\" WHERE \"total_time_in_office\"='7 years, 335 days' AND \"assumed_office\"='17 may 1919';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_premiers\" (\n \"rank\" real,\n \"state\" text,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: Premier Sir Charles Cowper (1807-1875) KCMG left office 2 October 1856, when did he assume office?"
},
{
"role": "assistant",
"content": "SELECT \"assumed_office\" FROM \"historical_premiers\" WHERE \"premier\"='sir charles cowper (1807-1875) kcmg' AND \"left_office\"='2 october 1856';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical_premiers\" (\n \"rank\" real,\n \"state\" text,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What average rank of the premier has NSW as the state, Liberalism as the party, and 22 March 1877 was the assumed office?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"historical_premiers\" WHERE \"state\"='nsw' AND \"party\"='liberalism' AND \"assumed_office\"='22 march 1877';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbon_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What power has A as the class, and 93.7 as the frequency?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbon_fm\" WHERE \"class\"='a' AND \"frequency\"='93.7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbon_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What city of license has cbon-fm-11 as the identifier?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cbon_fm\" WHERE \"identifier\"='cbon-fm-11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbon_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What power has thunder bay as the city of license?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbon_fm\" WHERE \"city_of_license\"='thunder bay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbon_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What identifier has 100000 watts as the power?"
},
{
"role": "assistant",
"content": "SELECT \"identifier\" FROM \"s_rebroadcaster_of_cbon_fm\" WHERE \"power\"='100000 watts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbon_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What identifier has 90.3 as the frequency?"
},
{
"role": "assistant",
"content": "SELECT \"identifier\" FROM \"s_rebroadcaster_of_cbon_fm\" WHERE \"frequency\"='90.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbon_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What class has cbon-fm-23 as the identifier?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbon_fm\" WHERE \"identifier\"='cbon-fm-23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of medals for West Germany with more than 1 bronze medal and more than 2 gold medals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medals_table\" WHERE \"bronze\">1 AND \"nation\"='west germany' AND \"gold\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is Denmark's rank?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"nation\"='denmark';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What country did ekaterina karsten row for with fa listed under notes?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"semifinal_a_b_2\" WHERE \"notes\"='fa' AND \"athlete\"='ekaterina karsten';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What time was the race for the country of france?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_a_b_2\" WHERE \"country\"='france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What time was the race for the country of france with fb listed under notes?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_a_b_2\" WHERE \"notes\"='fb' AND \"country\"='france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the sum of the ranks for bulgaria?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"semifinal_a_b_2\" WHERE \"country\"='bulgaria';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank of the new zealand team that had fb listed under notes?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"semifinal_a_b_2\" WHERE \"notes\"='fb' AND \"country\"='new zealand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a Pick of 74?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"tenth_round\" WHERE \"pick\"=74;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Team has a Position of linebacker?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"tenth_round\" WHERE \"position\"='linebacker';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Team for Stanford College?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"tenth_round\" WHERE \"college\"='stanford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What Pick does the College Southeastern Louisiana have?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"tenth_round\" WHERE \"college\"='southeastern louisiana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"paracanoe\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the Gold that has the Total larger than 2, and the Bronze smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"paracanoe\" WHERE \"total\">2 AND \"bronze\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"paracanoe\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the Nation that has the Bronze of 1, and the Gold of 0?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"paracanoe\" WHERE \"bronze\"=1 AND \"gold\"=0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"paracanoe\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the average Total that has the Silver larger than 1, and the Bronze smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"paracanoe\" WHERE \"silver\">1 AND \"bronze\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the highest number of bronze medals when there were a total of 4 medals, 1 silver medals, and less than 2 medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"total\"=4 AND \"silver\"=1 AND \"gold\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_8_teams_qualified_for_team_finals\" (\n \"position\" text,\n \"country\" text,\n \"floor\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"team_total\" real\n);\n\nQuestion: Count the Pommel Horse that has Rings smaller than 59.85 and a Team Total larger than 361.2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pommel_horse\") FROM \"top_8_teams_qualified_for_team_finals\" WHERE \"rings\"<59.85 AND \"team_total\">361.2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_8_teams_qualified_for_team_finals\" (\n \"position\" text,\n \"country\" text,\n \"floor\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"team_total\" real\n);\n\nQuestion: Name the highest Parallel Bars of the united states with a Vault smaller than 63.85?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"parallel_bars\") FROM \"top_8_teams_qualified_for_team_finals\" WHERE \"country\"='united states' AND \"vault\"<63.85;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_8_teams_qualified_for_team_finals\" (\n \"position\" text,\n \"country\" text,\n \"floor\" real,\n \"pommel_horse\" real,\n \"rings\" real,\n \"vault\" real,\n \"parallel_bars\" real,\n \"horizontal_bar\" real,\n \"team_total\" real\n);\n\nQuestion: Name the highest Horizontal Bar which is in france and Rings smaller than 58.975?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"horizontal_bar\") FROM \"top_8_teams_qualified_for_team_finals\" WHERE \"country\"='france' AND \"rings\"<58.975;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_february_21_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"televote_sms\" text,\n \"place\" real\n);\n\nQuestion: who is the artist when the televote/sms is 3.20%?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"final_february_21_2009\" WHERE \"televote_sms\"='3.20%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_february_21_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"televote_sms\" text,\n \"place\" real\n);\n\nQuestion: what is the place when the televote/sms is 2.39%?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"place\") FROM \"final_february_21_2009\" WHERE \"televote_sms\"='2.39%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_february_21_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"televote_sms\" text,\n \"place\" real\n);\n\nQuestion: how many times was the televote/sms 2.39% and the place more than 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draw\") FROM \"final_february_21_2009\" WHERE \"televote_sms\"='2.39%' AND \"place\">9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1933\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: Which Release date has a Production Num larger than 5888, and a Director of hugh harman and friz freleng?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1933\" WHERE \"production_num\">5888 AND \"director\"='hugh harman and friz freleng';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1933\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: How many production numbers have a Title of bosko in dutch?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"production_num\") FROM \"1933\" WHERE \"title\"='bosko in dutch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1933\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: Which Release date has a Director of tom palmer, and a Production Num larger than 5956?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1933\" WHERE \"director\"='tom palmer' AND \"production_num\">5956;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: How many Goals have Years at club of 1961\u20131966, and a Debut year larger than 1961?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals\") FROM \"1960s\" WHERE \"years_at_club\"='1961\u20131966' AND \"debut_year\">1961;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: Which Debut year has Goals of 0, and Years at club of 1963, and Games larger than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"debut_year\") FROM \"1960s\" WHERE \"goals\"=0 AND \"years_at_club\"='1963' AND \"games\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: Which Debut year has a Player of bob hayton, and Games smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"debut_year\") FROM \"1960s\" WHERE \"player\"='bob hayton' AND \"games\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the player who competed in the Women's Individual Class 3 in Table Tennis?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"medallists\" WHERE \"sport\"='table tennis' AND \"event\"='women''s individual class 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What was the date of the Women's Individual Class 3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"medallists\" WHERE \"event\"='women''s individual class 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What event did Rastislav Turecek participate in?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"medallists\" WHERE \"name\"='rastislav turecek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medallists\" (\n \"medal\" text,\n \"name\" text,\n \"sport\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What sport did Miroslav Jambor Richard Csejtey participate in?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"medallists\" WHERE \"name\"='miroslav jambor richard csejtey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Which Artist has a Draw of 6?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"results\" WHERE \"draw\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Which Song has a Draw smaller than 7, and Points larger than 41, and a Language of german?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"results\" WHERE \"draw\"<7 AND \"points\">41 AND \"language\"='german';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bmi_awards\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the years after 2001?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"bmi_awards\" WHERE \"year\">2001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bmi_awards\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: Who was the nominee for 2005?"
},
{
"role": "assistant",
"content": "SELECT \"nominee_s\" FROM \"bmi_awards\" WHERE \"year\"=2005;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"name\" text,\n \"gp_gs\" text,\n \"receptions\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: what is the gp-gs when the receptions is more than 4, long is 55 and avg/g is 151?"
},
{
"role": "assistant",
"content": "SELECT \"gp_gs\" FROM \"receiving\" WHERE \"receptions\">4 AND \"long\"=55 AND \"avg_g\"=151;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"name\" text,\n \"gp_gs\" text,\n \"receptions\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: what is the name when avg/g is 13.7?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"receiving\" WHERE \"avg_g\"=13.7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"name\" text,\n \"gp_gs\" text,\n \"receptions\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: How many times is avg/g 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"receptions\") FROM \"receiving\" WHERE \"avg_g\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"name\" text,\n \"gp_gs\" text,\n \"receptions\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: what is the avg/g for john conner when long is less than 25?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"avg_g\") FROM \"receiving\" WHERE \"name\"='john conner' AND \"long\"<25;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What conference did the player originally from the denver broncos play in?"
},
{
"role": "assistant",
"content": "SELECT \"conf\" FROM \"notable_undrafted_players\" WHERE \"original_nfl_team\"='denver broncos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: Who was the player from texas southern?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"notable_undrafted_players\" WHERE \"college\"='texas southern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What conference did the player with the position of rb play in?"
},
{
"role": "assistant",
"content": "SELECT \"conf\" FROM \"notable_undrafted_players\" WHERE \"pos\"='rb';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What was the original nfl team that the player was in from the midwestern conference?"
},
{
"role": "assistant",
"content": "SELECT \"original_nfl_team\" FROM \"notable_undrafted_players\" WHERE \"conf\"='midwestern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What position did athlete play from Tennessee state?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"notable_undrafted_players\" WHERE \"college\"='tennessee state';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"new_area_code\" real,\n \"where\" text,\n \"affected_area_codes\" text,\n \"format\" text,\n \"effective_date\" text\n);\n\nQuestion: Which Affected area codes have an Effective date of august 30, 2014?"
},
{
"role": "assistant",
"content": "SELECT \"affected_area_codes\" FROM \"see_also\" WHERE \"effective_date\"='august 30, 2014';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"new_area_code\" real,\n \"where\" text,\n \"affected_area_codes\" text,\n \"format\" text,\n \"effective_date\" text\n);\n\nQuestion: Which Effective date has a Where of illinois, and Affected area codes of 217?"
},
{
"role": "assistant",
"content": "SELECT \"effective_date\" FROM \"see_also\" WHERE \"where\"='illinois' AND \"affected_area_codes\"='217';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"new_area_code\" real,\n \"where\" text,\n \"affected_area_codes\" text,\n \"format\" text,\n \"effective_date\" text\n);\n\nQuestion: Which New area code is in nevada?"
},
{
"role": "assistant",
"content": "SELECT \"new_area_code\" FROM \"see_also\" WHERE \"where\"='nevada';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"theme_song_t_sub_theme_song_st\" text,\n \"genre\" text\n);\n\nQuestion: Which Airing date has a Number of episodes larger than 20, and a Genre of modern drama?"
},
{
"role": "assistant",
"content": "SELECT \"airing_date\" FROM \"first_line_series\" WHERE \"number_of_episodes\">20 AND \"genre\"='modern drama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"theme_song_t_sub_theme_song_st\" text,\n \"genre\" text\n);\n\nQuestion: Which Genre has an English title (Chinese title) of the romance of the white hair maiden \u767d\u9aee\u9b54\u5973\u50b3?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"first_line_series\" WHERE \"english_title_chinese_title\"='the romance of the white hair maiden \u767d\u9aee\u9b54\u5973\u50b3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_and_grand_finalists\" (\n \"year\" real,\n \"champion\" text,\n \"grand_finalist\" text,\n \"champion_team_members\" text,\n \"grand_finalists\" text\n);\n\nQuestion: who is the grand finalist when the grand finalists are jonathan loh, peterson poon, nathan santos?"
},
{
"role": "assistant",
"content": "SELECT \"grand_finalist\" FROM \"past_champions_and_grand_finalists\" WHERE \"grand_finalists\"='jonathan loh, peterson poon, nathan santos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_and_grand_finalists\" (\n \"year\" real,\n \"champion\" text,\n \"grand_finalist\" text,\n \"champion_team_members\" text,\n \"grand_finalists\" text\n);\n\nQuestion: what is the earliest year when the champion team members are charisse borromeo, jennifer ong, larissa co?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"past_champions_and_grand_finalists\" WHERE \"champion_team_members\"='charisse borromeo, jennifer ong, larissa co';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_and_grand_finalists\" (\n \"year\" real,\n \"champion\" text,\n \"grand_finalist\" text,\n \"champion_team_members\" text,\n \"grand_finalists\" text\n);\n\nQuestion: what is the year when the champion team members are mikee de vega, jari monteagudo, crissy aquino?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"past_champions_and_grand_finalists\" WHERE \"champion_team_members\"='mikee de vega, jari monteagudo, crissy aquino';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_champions_and_grand_finalists\" (\n \"year\" real,\n \"champion\" text,\n \"grand_finalist\" text,\n \"champion_team_members\" text,\n \"grand_finalists\" text\n);\n\nQuestion: who are the grand finalists when the champion team members are miko biscocho, claude gomez, mikee victoriano?"
},
{
"role": "assistant",
"content": "SELECT \"grand_finalists\" FROM \"past_champions_and_grand_finalists\" WHERE \"champion_team_members\"='miko biscocho, claude gomez, mikee victoriano';"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total number of medals for a team ranked smaller than 1 and had 20 gold medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"gold\"=20 AND \"rank\"<1;"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the nation that had more than 1 gold medal and a total of 62 medals?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\">1 AND \"total\"=62;"
}
]
|
[
{
"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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total medals when there were 0 gold medals and 1 silver?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"silver\"=1 AND \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"oksana_slivenko_rus\" text,\n \"123kg\" text,\n \"santo_domingo_dominican\" text\n);\n\nQuestion: What's the 123kg of the Total world record?"
},
{
"role": "assistant",
"content": "SELECT \"123kg\" FROM \"records\" WHERE \"world_record\"='total';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"oksana_slivenko_rus\" text,\n \"123kg\" text,\n \"santo_domingo_dominican\" text\n);\n\nQuestion: What's the world record when the 123kg was 275kg?"
},
{
"role": "assistant",
"content": "SELECT \"world_record\" FROM \"records\" WHERE \"123kg\"='275kg';"
}
]
|
[
{
"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\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the name for the assembly segment with a constituency number of 214?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"constituency_number\"='214';"
}
]
|
[
{
"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\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What district has an assembly segment named mahidpur?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"name\"='mahidpur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"team\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: Who is Doug Basham's team?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"results\" WHERE \"wrestler\"='doug basham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"team\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: What's Jorge Santana's elimination?"
},
{
"role": "assistant",
"content": "SELECT \"elimination\" FROM \"results\" WHERE \"wrestler\"='jorge santana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"team\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: Who's the wrestler with an elimination of 1?"
},
{
"role": "assistant",
"content": "SELECT \"wrestler\" FROM \"results\" WHERE \"elimination\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"team\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: Who's the eliminated by when the elimination was 1?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated_by\" FROM \"results\" WHERE \"elimination\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the date where the result was L 27-10 in a week before week 9?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<9 AND \"result\"='l 27-10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationaal_songfestival_2009_1_february_2\" (\n \"draw\" real,\n \"song\" text,\n \"jury\" real,\n \"televote\" real,\n \"total\" real,\n \"place\" text\n);\n\nQuestion: What sum of draw had more than 22 in Jury and a Televote of 130?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draw\") FROM \"nationaal_songfestival_2009_1_february_2\" WHERE \"jury\">22 AND \"televote\"=130;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nationaal_songfestival_2009_1_february_2\" (\n \"draw\" real,\n \"song\" text,\n \"jury\" real,\n \"televote\" real,\n \"total\" real,\n \"place\" text\n);\n\nQuestion: What is the total of the jury that is 2nd place and the total is larger than 190?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"jury\") FROM \"nationaal_songfestival_2009_1_february_2\" WHERE \"place\"='2nd' AND \"total\">190;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What's the average L/km combines when the L/100km Urban is 13.9, the mpg-UK combined is more than 28.5 and the mpg-UK extra urban is less than 38.7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"l_100km_combined\") FROM \"see_also\" WHERE \"l_100km_urban_cold\"=13.9 AND \"mpg_uk_combined\">28.5 AND \"mpg_uk_extra_urban\"<38.7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What's the least mpg-UK combined when the mpg-UK urban is 25.4, the L/100km extra urban is less than 6.9 and the L/100km urban is more than 11.1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"mpg_uk_combined\") FROM \"see_also\" WHERE \"mpg_uk_urban_cold\"=25.4 AND \"l_100km_extra_urban\"<6.9 AND \"l_100km_urban_cold\">11.1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What's the CO2 g/km of a Fiat running on diesel with the L/100km urban more than 6.3 and an mpg-UK combined of 43.5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"co_2_g_km\") FROM \"see_also\" WHERE \"fuel_type\"='diesel' AND \"manufacturer\"='fiat' AND \"l_100km_urban_cold\">6.3 AND \"mpg_uk_combined\"=43.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What's the total L/100km extra urban fueled by diesel, when the mpg-UK combines is more than 19.2, mpg-US is less than 50 and the L/100m combined is less than 5.7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"l_100km_extra_urban\") FROM \"see_also\" WHERE \"mpg_uk_combined\">19.2 AND \"l_100km_combined\"<5.7 AND \"fuel_type\"='diesel' AND \"mpg_us_combined\"<50;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What's the engine capacity when the mpg-UK urban is less than 12.2, the mpg-UK extra urban is less than 18.8 and the mpg-US turban is less than 7.2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"engine_capacity\") FROM \"see_also\" WHERE \"mpg_uk_urban_cold\"<12.2 AND \"mpg_uk_extra_urban\"<18.8 AND \"mpg_us_urban\"<7.2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What's the mpg-US urban when the mpg-UK urban is 20 and the mpg-UK extra urban is less than 37.2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"mpg_us_urban\") FROM \"see_also\" WHERE \"mpg_uk_urban_cold\"=20 AND \"mpg_uk_extra_urban\"<37.2;"
}
]
|
[
{
"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 \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score on 2010-07-13 when Abby wambach had the assist/pass?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"assist_pass\"='abby wambach' AND \"date\"='2010-07-13';"
}
]
|
[
{
"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 \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the location on 2008-06-17 when the lineup was start?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"international_goals\" WHERE \"lineup\"='start' AND \"date\"='2008-06-17';"
}
]
|
[
{
"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 \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the assist/pass on 2008-01-16 when the score was 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"assist_pass\" FROM \"international_goals\" WHERE \"date\"='2008-01-16' AND \"score\"='2-0';"
}
]
|
[
{
"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 \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result at match reports?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"location\"='match reports';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" text,\n \"lost\" text,\n \"tied\" text,\n \"points\" text,\n \"goals_for\" text,\n \"goals_against\" text,\n \"standing\" text\n);\n\nQuestion: What's the points if the goals against were 222?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"regular_season\" WHERE \"goals_against\"='222';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" text,\n \"lost\" text,\n \"tied\" text,\n \"points\" text,\n \"goals_for\" text,\n \"goals_against\" text,\n \"standing\" text\n);\n\nQuestion: What are the points if the goals against were 260?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"regular_season\" WHERE \"goals_against\"='260';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" text,\n \"lost\" text,\n \"tied\" text,\n \"points\" text,\n \"goals_for\" text,\n \"goals_against\" text,\n \"standing\" text\n);\n\nQuestion: What are the games with an Involuntary suspension of Season (hurricane Rita)?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"regular_season\" WHERE \"standing\"='involuntary suspension of season (hurricane rita)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" text,\n \"lost\" text,\n \"tied\" text,\n \"points\" text,\n \"goals_for\" text,\n \"goals_against\" text,\n \"standing\" text\n);\n\nQuestion: What are the goals for a lost of Involuntary suspension of Season (hurricane Rita)?"
},
{
"role": "assistant",
"content": "SELECT \"goals_for\" FROM \"regular_season\" WHERE \"lost\"='involuntary suspension of season (hurricane rita)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" text,\n \"lost\" text,\n \"tied\" text,\n \"points\" text,\n \"goals_for\" text,\n \"goals_against\" text,\n \"standing\" text\n);\n\nQuestion: What's the season that had a lost of 9 with 72 games?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"regular_season\" WHERE \"games\"='72' AND \"lost\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_8_appearances\" (\n \"season\" text,\n \"event_type\" text,\n \"location\" text,\n \"format\" text,\n \"date\" text,\n \"rank\" real\n);\n\nQuestion: What event did he compete in at Taipei?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"top_8_appearances\" WHERE \"location\"='taipei';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_8_appearances\" (\n \"season\" text,\n \"event_type\" text,\n \"location\" text,\n \"format\" text,\n \"date\" text,\n \"rank\" real\n);\n\nQuestion: In what season did he compete in the Grand Prix in Kuala Lumpur?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"top_8_appearances\" WHERE \"event_type\"='grand prix' AND \"location\"='kuala lumpur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player with a pick less than 3 from team san diego?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"first_round\" WHERE \"pick\"<3 AND \"team\"='san diego';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elite_men\" (\n \"year\" text,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What location did david mccann receive a siver and morgan fox win the gold?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"elite_men\" WHERE \"silver\"='david mccann' AND \"gold\"='morgan fox';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elite_men\" (\n \"year\" text,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who received the bronze in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"elite_men\" WHERE \"year\"='2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elite_men\" (\n \"year\" text,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who received the silver in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"silver\" FROM \"elite_men\" WHERE \"year\"='2006';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the name for the club Liaoning in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='liaoning';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_m\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What was the spike for the Army Club in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"spike\" FROM \"volleyball_at_the_2008_summer_olympics_m\" WHERE \"2008_club\"='army';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.