广招英雄贴:输入日期,查询,内容为每天17点之前的个人业绩总额
SELECT
sum(dpxstz.xssl) as t_xssl,
sum(dpxstz.cxsje) as t_xsje,
sum(dpxstz.xj) as t_xj,
sum(dpxstz.ysk) as t_ysk,
sum(dpxstz.sswr) as t_sswr,
sum(dpxstz.xszk) as t_xszk,
dpxstz.hth,
bmda.bmmc
FROM dpxstz ,bmda
WHERE dpxstz.bmh=bmda.bmh and
( ( dpxstz.bmh like :部门号 ) and
( dpxstz.rq >= :开始日期 ) and
( dpxstz.rq <= :结束日期 ) )
group by dpxstz.hth,bmda.bmmc