human
Schema:
body_builder (Body_Builder_ID, People_ID, Snatch, Clean_Jerk, Total)
people (People_ID, Name, Height, Weight, Birth_Date, Birth_Place)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the information of all the people.
assistant
SELECT * FROM people;
human
Show the Birth Date and Birth Place about each one.
assistant
SELECT Birth_Date , Birth_Place FROM people;
human
What about the body builders?
assistant
SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;
human
Among those, show the three which have the highest total points?
assistant
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 3;
human
What about the highest total point?
assistant
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 ;