level 7
select d.logdate,sum(d.clocktime)/3600,sum(quantity*smv)/60 from dyempsumm
d,common..organizationunit o,
common..employee e,common..designation s
where d.logdate between '2009-8-1' and '2009-8-31'
and d.employeeno=e.employeeno and d.prodgroup = o.shortname
and o.type=2
and e.designationcode=s.designationcode
and o.orgunitparent not in(91,92,93,94,95,90,89,1346,1376,1405,39,752,127)
and (d.mono <> 'mo001' and (d.mono not like 'FD%')
and (d.mono not like 'AB%')and (d.mono not like 'ND%')
and (d.mono not like 'NP%')and (d.mono not like 'TC%'))
group by d.logdate
order by d.logdate
2009年09月14日 09点09分