human
Schema:
perpetrator (Perpetrator_ID, People_ID, Date, Year, Location, Country, Killed, Injured)
people (People_ID, Name, Height, Weight, Home Town)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the names of people in ascending order of height?
assistant
SELECT Name FROM People ORDER BY Height ASC
human
What are the heights of perpetrators in descending order of the number of people they injured?
assistant
SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC
human
List the date of perpetrators in descending order of the number of people killed.
assistant
SELECT Date FROM perpetrator ORDER BY Killed DESC
human
List the names of perpetrators in descending order of the year.
assistant
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC
human
What is the name of the perpetrator with the biggest weight.
assistant
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1
human
Show the date of the tallest perpetrator.
assistant
SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1 ;