题解 | 计算25岁以上和以下的用户数量
select
case
when age is null
or age < 25 then '25岁以下'
else '25岁及以上'
end as age_cut,
count(device_id) number
from
user_profile
group by
age_cut
select
case
when age is null
or age < 25 then '25岁以下'
else '25岁及以上'
end as age_cut,
count(device_id) number
from
user_profile
group by
age_cut
相关推荐