|
@@ -64,15 +64,15 @@ public class RankingServiceImpl implements IRankingService {
|
|
|
sum(today_amount) as today_amount,
|
|
|
sum(today_buy_amount) as today_buy_amount,
|
|
|
sum(today_nature_amount) as today_nature_amount,
|
|
|
- sum(total_amount) as total_amount,
|
|
|
- sum(total_buy_amount) as total_buy_amount,
|
|
|
- sum(total_nature_amount) as total_nature_amount,
|
|
|
- round(if(sum(total_recharge_count) > 0, sum(total_amount) / sum(total_recharge_count), 0), 2) as avg_amount,
|
|
|
+ max(total_amount) as total_amount,
|
|
|
+ max(total_buy_amount) as total_buy_amount,
|
|
|
+ max(total_nature_amount) as total_nature_amount,
|
|
|
+ max(avg_amount) as avg_amount,
|
|
|
sum(reg_user_count) as reg_user_count,
|
|
|
- sum(total_recharge_user_count) as total_recharge_user_count,
|
|
|
- sum(total_recharge_count) as total_recharge_count,
|
|
|
- sum(total_cost) as total_cost,
|
|
|
- round(if(sum(total_cost) > 0, sum(total_buy_amount) / sum(total_cost), 0), 4) as total_roi
|
|
|
+ max(total_recharge_user_count) as total_recharge_user_count,
|
|
|
+ max(total_recharge_count) as total_recharge_count,
|
|
|
+ max(total_cost) as total_cost,
|
|
|
+ max(total_roi) as total_roi
|
|
|
from ads_game_recharge_ranking
|
|
|
""";
|
|
|
}
|
|
@@ -118,11 +118,11 @@ public class RankingServiceImpl implements IRankingService {
|
|
|
max(reg_game_name) as reg_game_name,
|
|
|
max(player_os) as player_os,
|
|
|
sum(today_total_amount) as today_total_amount,
|
|
|
- sum(first_amount) as first_amount,
|
|
|
- sum(last_amount) as last_amount,
|
|
|
- sum(total_amount) as total_amount,
|
|
|
- round(if(sum(total_amount_count) > 0, sum(total_amount) / sum(total_amount_count), 0), 2) as avg_amount,
|
|
|
- sum(total_amount_count) as total_amount_count,
|
|
|
+ max(first_amount) as first_amount,
|
|
|
+ max(last_amount) as last_amount,
|
|
|
+ max(total_amount) as total_amount,
|
|
|
+ max(avg_amount) as avg_amount,
|
|
|
+ max(total_amount_count) as total_amount_count,
|
|
|
max(last_amount_game_id) as last_amount_game_id,
|
|
|
max(last_amount_game_name) as last_amount_game_name,
|
|
|
max(last_amount_time) as last_amount_time
|