|
|
-select DATE_FORMAT(t1.checkdate,'%Y') y,DATE_FORMAT(t1.checkdate,'%m') m,CAST(count(1) AS DECIMAL(16,0)) typestatistics from sa_order t1 where t1.status not in('新建','提交') and t1.siteid =$siteid$ and $where$ and t1.checkdate >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) group by DATE_FORMAT(t1.checkdate,'%Y'),DATE_FORMAT(t1.checkdate,'%m')
|
|
|
+select DATE_FORMAT(t1.checkdate,'%Y') y,DATE_FORMAT(t1.checkdate,'%m') m,CAST(count(1) AS DECIMAL(16,0)) typestatistics from sa_order t1 where t1.status not in('新建','提交') and t1.siteid =$siteid$ and $where$ and year(t1.checkdate) >= year(DATE_SUB(CURDATE(), INTERVAL 1 YEAR)) group by DATE_FORMAT(t1.checkdate,'%Y'),DATE_FORMAT(t1.checkdate,'%m')
|