MySQL與Oracle 按年齡段分組查詢 |
發(fā)布時間: 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 本文出自:億恩科技【mszdt.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】 --> |