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
What are the names of all the people?
assistant
SELECT Name FROM people;
human
Show the names of body builders.
assistant
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID;
human
Among those, which total score is higher than 200?
assistant
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 200;
human
What about higher than 300?
assistant
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300 ;