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 heights of body builders with total score smaller than 315?
assistant
SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315
human
What are 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
What is the name of the body builder with the greatest body weight?
assistant
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
human
List the total scores of body builders in ascending order.
assistant
SELECT Total FROM body_builder ORDER BY Total ASC
human
What are the names of body builders in descending order of total scores?
assistant
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC
human
What are the names of body builders whose total score is 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 ;