|
@@ -383,9 +383,9 @@ class OrderH5Info(BaseHandler):
|
|
|
sum(a.amount) sum_amount,
|
|
|
sum(if(a.app_id=c.app_id,a.amount,0)) natural_amount,
|
|
|
count(DISTINCT(a.mem_id)) as human_count,
|
|
|
- count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,0))) natural_human_count,
|
|
|
+ count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,null))) natural_human_count,
|
|
|
ROUND(if(sum(a.amount)>0,sum(if(a.app_id=c.app_id,a.amount,0)) /sum(a.amount),0) ,2) amount_rate,
|
|
|
- ROUND( if(count(DISTINCT(a.mem_id))>0,count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,0)))/count(DISTINCT(a.mem_id)),0),2) human_count_rate
|
|
|
+ ROUND( if(count(DISTINCT(a.mem_id))>0,count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,null)))/count(DISTINCT(a.mem_id)),0),2) human_count_rate
|
|
|
from db_mp.h_pay a
|
|
|
left join db_mp.h_member c on a.mem_id = c.id
|
|
|
where a.app_id in (select id from db_mp.h_game
|