SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as createTime
SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as createTime,coupon_id as couponId
,COUNT(DISTINCT c_user_id) as couponUserCount,count(*) as couponCount
,COUNT(DISTINCT c_user_id) as couponUserCount,count(*) as couponCount
,(select Count(*) from wx_coupon_order c where coupon_order_status=1 AND DATE_FORMAT(create_date,'%Y-%m-%d')=createTime and tenant_id=#{tenantId} AND c.update_date >= #{startTime} and c.update_date <= #{endTime}) as verifyCount
,(select Count(DISTINCT c_user_id) from wx_coupon_order d where coupon_order_status=1 AND DATE_FORMAT(create_date,'%Y-%m-%d')=createTime and tenant_id=#{tenantId} AND d.update_date >= #{startTime} and d.update_date <= #{endTime}) as verifyUserCount
from wx_coupon_order where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date <= #{endTime} GROUP BY createTime
,(select Count(*) from wx_coupon_order c where coupon_order_status=1 AND DATE_FORMAT(create_date,'%Y-%m-%d')=createTime and tenant_id=#{tenantId} and c.coupon_id=couponId AND c.update_date >= #{startTime} and c.update_date <= #{endTime}) as verifyCount
,(select Count(DISTINCT c_user_id) from wx_coupon_order d where coupon_order_status=1 AND DATE_FORMAT(create_date,'%Y-%m-%d')=createTime and tenant_id=#{tenantId} and d.coupon_id=couponId AND d.update_date >= #{startTime} and d.update_date <= #{endTime}) as verifyUserCount
from wx_coupon_order where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date <= #{endTime} GROUP BY createTime,couponId