${if(len(等级)==0, "select roast_season,left(area_company,2)as area_company1,AVG(standard_stem_rate),sum(check_amount) from physics_check where work_month in ('"+月份+"') AND area_company is not null and roast_season='"+烤季+"' group by roast_season,area_company1", "select roast_season,left(area_company,2)as area_company1,smoke_level,AVG(standard_stem_rate),sum(checka_amount) from physics_check where work_month in ('"+月份+"') and smoke_level='"+等级+"' and roast_season='"+烤季+"' AND area_company is not null group by roast_season,area_company1,smoke_level")} |