select ROUND((sum(ORDERAMOUNT)*0.0005),2) as s from boc_payinfo t where 1=1 and mechDate >= '20161001' and mechDate <= '20161003' and PROCSTATE = '04' and ACCCHECKSTATE = '02' and mechno = 00001 group by mechdate
ROUND((sum(ORDERAMOUNT)*0.0005),2) 这句需要用sum包裹,oracle可以,mysql不行,现在需要用MySQl