|  | @@ -72,7 +72,7 @@
 | 
	
		
			
				|  |  |          (sum(charge) / sum(activation)) activationPrice,
 | 
	
		
			
				|  |  |          ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice,
 | 
	
		
			
				|  |  |          account_id accountId,
 | 
	
		
			
				|  |  | -        (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
 | 
	
		
			
				|  |  | +        (select auth_name from ctop_user_allocation where account_id = t1.account_id limit 1) accountName,
 | 
	
		
			
				|  |  |          sum(event_next_day_stay) eventNextDayStay,
 | 
	
		
			
				|  |  |          (case
 | 
	
		
			
				|  |  |          when sum(activation) != 0
 | 
	
	
		
			
				|  | @@ -81,7 +81,7 @@
 | 
	
		
			
				|  |  |          end
 | 
	
		
			
				|  |  |          ) eventNextDayStayRatio
 | 
	
		
			
				|  |  |          from
 | 
	
		
			
				|  |  | -        ctop_kuaishou_report_daily_account
 | 
	
		
			
				|  |  | +        ctop_kuaishou_report_daily_account t1
 | 
	
		
			
				|  |  |          where account_id in
 | 
	
		
			
				|  |  |          <foreach item="item" index="index" collection="accountIds"
 | 
	
		
			
				|  |  |                   open="(" separator="," close=")">
 | 
	
	
		
			
				|  | @@ -117,7 +117,7 @@
 | 
	
		
			
				|  |  |          end
 | 
	
		
			
				|  |  |          ) eventRegisterCost,
 | 
	
		
			
				|  |  |          account_id accountId,
 | 
	
		
			
				|  |  | -        (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
 | 
	
		
			
				|  |  | +        (select auth_name from ctop_user_allocation where account_id = = t1.account_id limit 1) accountName,
 | 
	
		
			
				|  |  |          sum(event_next_day_stay) eventNextDayStay,
 | 
	
		
			
				|  |  |          (case
 | 
	
		
			
				|  |  |          when sum(activation) != 0
 | 
	
	
		
			
				|  | @@ -126,7 +126,7 @@
 | 
	
		
			
				|  |  |          end
 | 
	
		
			
				|  |  |          ) eventNextDayStayRatio
 | 
	
		
			
				|  |  |          from
 | 
	
		
			
				|  |  | -        ctop_kuaishou_report_daily_account
 | 
	
		
			
				|  |  | +        ctop_kuaishou_report_daily_account t1
 | 
	
		
			
				|  |  |          where stat_date <= #{startDate}
 | 
	
		
			
				|  |  |          and stat_date >= #{endDate}
 | 
	
		
			
				|  |  |          and account_id in
 | 
	
	
		
			
				|  | @@ -171,9 +171,9 @@
 | 
	
		
			
				|  |  |          ) eventRegisterCost,
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          account_id accountId,
 | 
	
		
			
				|  |  | -        (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName
 | 
	
		
			
				|  |  | +        (select auth_name from ctop_user_allocation where account_id = = t1.account_id limit 1) accountName
 | 
	
		
			
				|  |  |          from
 | 
	
		
			
				|  |  | -        ctop_kuaishou_report_hourly_account
 | 
	
		
			
				|  |  | +        ctop_kuaishou_report_hourly_account t1
 | 
	
		
			
				|  |  |          where stat_date = #{date}
 | 
	
		
			
				|  |  |          and stat_hour <= #{statHour}
 | 
	
		
			
				|  |  |          and account_id in
 | 
	
	
		
			
				|  | @@ -215,7 +215,7 @@
 | 
	
		
			
				|  |  |          end
 | 
	
		
			
				|  |  |          ) eventRegisterCost,
 | 
	
		
			
				|  |  |          account_id accountId,
 | 
	
		
			
				|  |  | -        (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
 | 
	
		
			
				|  |  | +        (select auth_name from ctop_user_allocation where account_id = = t1.account_id limit 1) accountName,
 | 
	
		
			
				|  |  |          sum(event_next_day_stay) eventNextDayStay,
 | 
	
		
			
				|  |  |          (case
 | 
	
		
			
				|  |  |          when sum(activation) != 0
 | 
	
	
		
			
				|  | @@ -224,7 +224,7 @@
 | 
	
		
			
				|  |  |          end
 | 
	
		
			
				|  |  |          ) eventNextDayStayRatio
 | 
	
		
			
				|  |  |          from
 | 
	
		
			
				|  |  | -        ctop_kuaishou_report_daily_account
 | 
	
		
			
				|  |  | +        ctop_kuaishou_report_daily_account t1
 | 
	
		
			
				|  |  |          where stat_date = #{statDate}
 | 
	
		
			
				|  |  |          and account_id in
 | 
	
		
			
				|  |  |          <foreach item="item" index="index" collection="accountIds"
 |