简体   繁体   English

Oracle SQL Select每个年龄段的总计

[英]Oracle SQL Select total of each age

I have a table... 我有桌子...

USER
USER_ID
USER_AGE

I need to get the total users for each age, ex: 我需要获取每个年龄段的总用户数,例如:

AGE    COUNT
1 12
2 27
3 5
.... etc, all the up to 100 ....等,最多100

I have no idea how to start, any help is greatly appreciated. 我不知道如何开始,非常感谢您的帮助。

select user_age, count(*) as count 
from users 
group by user_age

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM