-- 1先用case,when标记年龄段 2分组统计,年龄段的数量
select a.age_cut,count(1) from (select case when age>=25 then '25岁及以上' when (age<25 or age is null) then  '25岁以下' end as age_cut from user_profile) a group by a.age_cut;