# Write a query that returns all the species in the zoo, and how many animals of
# each species there are, sorted with the most populous species at the top.
# The result should have two columns: species and number.
# The animals table has columns (name, species, birthdate) for each individual.
select count(*) as num,species
from animals
group by species
order by num desc;
转载于:https://my.oschina.net/Bettyty/blog/757870