select 产品类型, sum(销量) 销量 from day_change1where 产品类型 is not null and 产品类型 not in ('支装水','桶装水')${if(area =='中国' ,"","and ((客户省份 = '" + area + "') or (客户市 = '" + area + "' ) )")}and 日期 between '${time1}' and '${time2}'${"and (客户省份 in (" + prov + ") or 客户市 in (" + city + "))"}group by 产品类型