用一条sql语句
查询abc表入职时间(jointime)为2012-8到2012-9所有在职(zaizhi=1 )的员工,按照部门(deptno)、性别(sex)统计人数 (一张表里)
select deptno as 部门, decode(sex,0,'男','女') as 性别,count(*) as 人数 from abc
where zaizhi=1 and jointime between '01-8月-12' and '30-9月-12' group by deptno, sex