# 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.

【优达学城测评】所有物种计数(8)

select count(*) as num,species

from animals

group by species 

order by num desc;

 

转载于:https://my.oschina.net/Bettyty/blog/757870

相关文章:

  • 2021-04-20
  • 2021-04-19
  • 2022-12-23
  • 2021-05-12
  • 2021-09-25
  • 2021-07-20
  • 2021-06-12
  • 2021-12-04
猜你喜欢
  • 2021-08-11
  • 2021-05-08
  • 2021-12-27
  • 2022-01-05
  • 2021-11-12
  • 2021-10-15
  • 2021-12-20
相关资源
相似解决方案