select user_profile.device_id, user_profile.gender, case when user_profile.age>=20 and user_profile.age <= 24 then '20-24岁' when user_profile.age>=25 then '25岁及以上' else '其他' end from user_profile; 关键词:case when then else end