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 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
What is the country that has the most perpetrators?
assistant
SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
human
How many distinct locations of perpetrators are there?
assistant
SELECT count(DISTINCT LOCATION) FROM perpetrator
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
What is the total kills of the perpetrators with height more than 1.84.
assistant
SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84
human
What is the location of the perpetrator with the largest kills.
assistant
SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1 ;