input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2;
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2;
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC;
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC;
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season);
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season);
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender";
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender";
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender";
Tables: country, team, match_season, player Columns: country.Country_id, country.Country_name, country.Capital, country.Official_native_language, team.Team_id, team.Name, match_season.Season, match_season.Player, match_season.Position, match_season.Country, match_season.Team, match_season.Draft_Pick_Number, match_seaso...
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: How many climbers are there? [/INST]
SELECT count(*) FROM climber;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Count the number of climbers. [/INST]
SELECT count(*) FROM climber;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: List the names of climbers in descending order of points. [/INST]
SELECT Name FROM climber ORDER BY Points DESC;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of the climbers, ordered by points descending?...
SELECT Name FROM climber ORDER BY Points DESC;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: List the names of climbers whose country is not Switzerland. [/IN...
SELECT Name FROM climber WHERE Country != "Switzerland";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of climbers who are not from the country of Sw...
SELECT Name FROM climber WHERE Country != "Switzerland";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What is the maximum point for climbers whose country is United Ki...
SELECT max(Points) FROM climber WHERE Country = "United Kingdom";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Return the maximum number of points for climbers from the United ...
SELECT max(Points) FROM climber WHERE Country = "United Kingdom";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: How many distinct countries are the climbers from? [/INST]
SELECT COUNT(DISTINCT Country) FROM climber;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Count the number of different countries that climbers are from. [...
SELECT COUNT(DISTINCT Country) FROM climber;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of mountains in ascending alphabetical order? ...
SELECT Name FROM mountain ORDER BY Name ASC;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Give the names of mountains in alphabetical order. [/INST]
SELECT Name FROM mountain ORDER BY Name ASC;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the countries of mountains with height bigger than 5000?...
SELECT Country FROM mountain WHERE Height > 5000;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Return the countries of the mountains that have a height larger t...
SELECT Country FROM mountain WHERE Height > 5000;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What is the name of the highest mountain? [/INST]
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Return the name of the mountain with the greatest height. [/INST]
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: List the distinct ranges of the mountains with the top 3 prominen...
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the different ranges of the 3 mountains with the highest...
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show names of climbers and the names of mountains they climb. [/I...
SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of climbers and the corresponding names of mou...
SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the names of climbers and the heights of mountains they clim...
SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of climbers and the corresponding heights of t...
SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the height of the mountain climbed by the climber with the m...
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What is the height of the mountain climbined by the climbing who ...
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the distinct names of mountains climbed by climbers from cou...
SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the different names of mountains ascended by climbers fr...
SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the times used by climbers to climb mountains in Country Uga...
SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the times used by climbers who climbed mountains in the ...
SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda";
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Please show the countries and the number of climbers from each co...
SELECT Country , COUNT(*) FROM climber GROUP BY Country;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: How many climbers are from each country? [/INST]
SELECT Country , COUNT(*) FROM climber GROUP BY Country;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: List the countries that have more than one mountain. [/INST]
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Which countries have more than one mountain? [/INST]
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: List the names of mountains that do not have any climber. [/INST]
SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber);
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of countains that no climber has climbed? [/IN...
SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber);
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the countries that have mountains with height more than 5600...
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the countries that have both mountains that are higher t...
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the range that has the most number of mountains. [/INST]
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Which range contains the most mountains? [/INST]
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: Show the names of mountains with height more than 5000 or promine...
SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000;
Tables: mountain, climber Columns: mountain.Mountain_ID, mountain.Name, mountain.Height, mountain.Prominence, mountain.Range, mountain.Country, climber.Climber_ID, climber.Name, climber.Country, climber.Time, climber.Points, climber.Mountain_ID Question: What are the names of mountains that have a height of over 5000 o...
SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: How many body builders are there? [/INST]
SELECT count(*) FROM body_builder;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: List the total scores of body builders in ascending o...
SELECT Total FROM body_builder ORDER BY Total ASC;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: List the snatch score and clean jerk score of body bu...
SELECT Snatch , Clean_Jerk FROM body_builder ORDER BY Snatch ASC;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What is the average snatch score of body builders? [/...
SELECT avg(Snatch) FROM body_builder;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the clean and jerk score of the body builder...
SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the birthdays of people in ascending order o...
SELECT Birth_Date FROM People ORDER BY Height ASC;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the names of body builders? [/INST]
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the names of body builders whose total score...
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What is the name of the body builder with the greates...
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the birth date and birth place of the body b...
SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the heights of body builders with total scor...
SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What is the average total score of body builders with...
SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the names of body builders in descending ord...
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: List each birth place along with the number of people...
SELECT Birth_Place , COUNT(*) FROM people GROUP BY Birth_Place;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What is the most common birth place of people? [/INST...
SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the birth places that are shared by at least...
SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: List the height and weight of people in descending or...
SELECT Height , Weight FROM people ORDER BY Height DESC;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: Show all information about each body builder. [/INST]
SELECT * FROM body_builder;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: List the names and origins of people who are not body...
SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: How many distinct birth places are there? [/INST]
SELECT count(DISTINCT Birth_Place) FROM people;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: How many persons are not body builders? [/INST]
SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder);
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: List the weight of the body builders who have snatch ...
SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200;
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What are the total scores of the body builders whose ...
SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%";
Tables: body_builder, people Columns: body_builder.Body_Builder_ID, body_builder.People_ID, body_builder.Snatch, body_builder.Clean_Jerk, body_builder.Total, people.People_ID, people.Name, people.Height, people.Weight, people.Birth_Date, people.Birth_Place Question: What is the minimum snatch score? [/INST]
SELECT min(snatch) FROM body_builder;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: How many ...
SELECT count(*) FROM election;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: List the ...
SELECT Votes FROM election ORDER BY Votes DESC;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: List the ...
SELECT Date , Vote_Percent FROM election;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT min(Vote_Percent) , max(Vote_Percent) FROM election;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT Name , Party FROM representative;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT Name FROM Representative WHERE Party != "Republican";
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT Lifespan FROM representative WHERE State = "New York" OR State = "Indiana";
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT T2.Name , T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What is t...
SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC LIMIT 1;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What is t...
SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican";
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What are ...
SELECT Party , COUNT(*) FROM representative GROUP BY Party;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What is t...
SELECT Party , COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What part...
SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: What stat...
SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2;
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: List the ...
SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election);
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: Show the ...
SELECT Party FROM representative WHERE State = "New York" INTERSECT SELECT Party FROM representative WHERE State = "Pennsylvania";
Tables: election, representative Columns: election.Election_ID, election.Representative_ID, election.Date, election.Votes, election.Vote_Percent, election.Seats, election.Place, representative.Representative_ID, representative.Name, representative.State, representative.Party, representative.Lifespan Question: How many ...
SELECT count(DISTINCT Party) FROM representative;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT count(*) FROM Apartment_Bookings;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT count(*) FROM Apartment_Bookings;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT booking_start_date , booking_end_date FROM Apartment_Bookings;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT booking_start_date , booking_end_date FROM Apartment_Bookings;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT DISTINCT building_description FROM Apartment_Buildings;
Tables: Apartment_Buildings, Apartments, Apartment_Facilities, Guests, Apartment_Bookings, View_Unit_Status Columns: Apartment_Buildings.building_id, Apartment_Buildings.building_short_name, Apartment_Buildings.building_full_name, Apartment_Buildings.building_description, Apartment_Buildings.building_address, Apartment...
SELECT DISTINCT building_description FROM Apartment_Buildings;