,hw_price,install_price,hw_cost,install_cost ,fentan_time FROM dj_device_details where `device_type` IN (8) GROUP BY active_merchant,LEFT(fentan_time ,7),pk_period ;
SELECT id,active_merchant,'门店',channel,pk_period,count(1) as num, settle_time, sum(pk_price) as total_price,fentan_time,DATE_ADD(fentan_time,INTERVAL pk_period MONTH ) as fentan_end_time,pk_price,