17,081
社区成员
发帖
与我相关
我的任务
分享
select count(*) as tot,sum(case when sex='男' then 1 else 0 end)/count(*) as m_rate,
sum(case when sex='女' then 1 else 0 end)/count(*) as f_rate
from a
select count(*) tot,sum(decode(sex,'男',1,0))/count(*) m_rate,
sum(decode(sex,'女',1,0))/count(*) f_rate
from a