todate(time) 是时间。。你展示出来。同时这个表的数据量比较大的。尽量多增加条件查询。。不然容易报错。。
select username,count(type) from fine_record_execute
where todate(time)>='${start} 00:00:00'
and todate(time)<='${end} 23:59:59'
${if(len(tname)==0,"","and tname like '"+tname+"%'")}
${if(len(czyh)=0,"","and username in('"+czyh+"')")}
and type>7
and type <= 27
GROUP BY username
order by username desc
这个表就是了。。里面有 上面就是限制它是导出类型的。。还有人员账号