SELECT
nc.id,
DATE_FORMAT(nc.update_time,'%Y-%m-%d'),
nc.create_user_id,
sku.id,
COUNT(p_number_gNJvQs) customer_num
FROM
`t_report_new_customer` nc
LEFT JOIN t_report_new_customer_offtake offtake ON offtake.execId=nc.id
LEFT JOIN `t_etms_plan_execute` e ON e.report_bo_id=3990 AND e.report_bo_item_id=offtake.id
LEFT JOIN t_bo_sku sku ON sku.id=e.target_bo_item_id
WHERE DATE_FORMAT(nc.update_time,'%Y-%m-%d') = DATE_SUB(CURDATE(),INTERVAL 1 DAY)
AND offtake.p_number_gNJvQs is not NULL AND sku.id is not NULL
GROUP BY sku.id,nc.create_user_id
INTO OUTFILE 'D:/SFTP Files/Offtake3/Out/offtake_synchronization_20160825.xlsx' ;
导出文件后打不开,
已解决问题
怎么解决的嘛,分享一下