MySQL与Oracle 按年龄段分组查询 |
发布时间: 2012/8/17 18:01:03 |
MySQL与Oracle 按年龄段分组查询: select nnd, count(*) from(
when em_age>=31 and em_age<=40 then '31-40' else 'other' end as nnd,em_sex from hr_employee ) hr_employee group by nnd 本文出自:亿恩科技【www.enkj.com】
when em_age>=31 and em_age<=40 then '31-40' else 'other' end as nnd,em_sex from hr_employee ) hr_employee group by nnd 本文出自:亿恩科技【www.enidc.com】 --> |