select post_date,city_code,city_desc,tuandui,tdmc,gasstation_code,gasstation_desc, sum sum_gun as '按年提枪次数', sum_gun as '当日提枪次数' from app_nonoil.kl_labordatawhere post_date<='${tjdate}' and year('${tjdate}')=substr(post_date,1,4) group by post_date,city_desc