|
@@ -448,6 +448,13 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
BigDecimal.ZERO:BigDecimal.valueOf(item.getRepeatRechargeUser()).divide(BigDecimal.valueOf(item.getUserRechargeUser()),4, RoundingMode.DOWN));
|
|
BigDecimal.ZERO:BigDecimal.valueOf(item.getRepeatRechargeUser()).divide(BigDecimal.valueOf(item.getUserRechargeUser()),4, RoundingMode.DOWN));
|
|
item.setUserRepeatRechargeRate(item.getNewUserRechargeUser() == 0 ?
|
|
item.setUserRepeatRechargeRate(item.getNewUserRechargeUser() == 0 ?
|
|
BigDecimal.ZERO:BigDecimal.valueOf(item.getRepeatRechargeUser()).divide(BigDecimal.valueOf(item.getNewUserRechargeUser()),4, RoundingMode.DOWN));
|
|
BigDecimal.ZERO:BigDecimal.valueOf(item.getRepeatRechargeUser()).divide(BigDecimal.valueOf(item.getNewUserRechargeUser()),4, RoundingMode.DOWN));
|
|
|
|
+
|
|
|
|
+ item.setUserRechargeCountCost(item.getUserRechargeCount() == 0 ?
|
|
|
|
+ BigDecimal.ZERO : item.getCost().divide(BigDecimal.valueOf(item.getUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
|
+ item.setOldUserRechargeCountCost(item.getOldUserRechargeCount() == 0 ?
|
|
|
|
+ BigDecimal.ZERO : item.getCost().divide(BigDecimal.valueOf(item.getOldUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
|
+ item.setShowRechargeCountCost(item.getShowRechargeCount() == 0 ?
|
|
|
|
+ BigDecimal.ZERO : item.getCost().divide(BigDecimal.valueOf(item.getShowRechargeCount()), 4, RoundingMode.DOWN));
|
|
}
|
|
}
|
|
return item;
|
|
return item;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
@@ -588,6 +595,9 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
sql.setEntity(entity).setCondition(cri);
|
|
sql.setEntity(entity).setCondition(cri);
|
|
dao.execute(sql);
|
|
dao.execute(sql);
|
|
GamePromoteTotalSumVO gamePromoteTotalSumVO = sql.getObject(GamePromoteTotalSumVO.class);
|
|
GamePromoteTotalSumVO gamePromoteTotalSumVO = sql.getObject(GamePromoteTotalSumVO.class);
|
|
|
|
+ if (null == gamePromoteTotalSumVO.getCost()){
|
|
|
|
+ return gamePromoteTotalSumVO;
|
|
|
|
+ }
|
|
|
|
|
|
//账面总计
|
|
//账面总计
|
|
SimpleCriteria showCri = getSimpleCriteria(dto);
|
|
SimpleCriteria showCri = getSimpleCriteria(dto);
|
|
@@ -731,12 +741,19 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
BigDecimal.ZERO : gamePromoteTotalSumVO.getUserRechargeMoney().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
BigDecimal.ZERO : gamePromoteTotalSumVO.getUserRechargeMoney().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
|
|
|
gamePromoteTotalSumVO.setUserRechargeCost(gamePromoteTotalSumVO.getUserRechargeUser() == 0 ?
|
|
gamePromoteTotalSumVO.setUserRechargeCost(gamePromoteTotalSumVO.getUserRechargeUser() == 0 ?
|
|
- BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeUser()), 2, RoundingMode.DOWN));
|
|
|
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
|
|
|
|
gamePromoteTotalSumVO.setRepeatRechargeRate(gamePromoteTotalSumVO.getUserRechargeUser() == 0 ?
|
|
gamePromoteTotalSumVO.setRepeatRechargeRate(gamePromoteTotalSumVO.getUserRechargeUser() == 0 ?
|
|
BigDecimal.ZERO : BigDecimal.valueOf(gamePromoteTotalSumVO.getRepeatRechargeUser()).divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
BigDecimal.ZERO : BigDecimal.valueOf(gamePromoteTotalSumVO.getRepeatRechargeUser()).divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
gamePromoteTotalSumVO.setUserRepeatRechargeRate(gamePromoteTotalSumVO.getNewUserRechargeUser() == 0 ?
|
|
gamePromoteTotalSumVO.setUserRepeatRechargeRate(gamePromoteTotalSumVO.getNewUserRechargeUser() == 0 ?
|
|
BigDecimal.ZERO : BigDecimal.valueOf(gamePromoteTotalSumVO.getRepeatRechargeUser()).divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getNewUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
BigDecimal.ZERO : BigDecimal.valueOf(gamePromoteTotalSumVO.getRepeatRechargeUser()).divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getNewUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
|
|
+
|
|
|
|
+ gamePromoteTotalSumVO.setUserRechargeCountCost(gamePromoteTotalSumVO.getUserRechargeCount() == 0 ?
|
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
|
+ gamePromoteTotalSumVO.setOldUserRechargeCountCost(gamePromoteTotalSumVO.getOldUserRechargeCount() == 0 ?
|
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getOldUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
|
+ gamePromoteTotalSumVO.setShowRechargeCountCost(gamePromoteTotalSumVO.getShowRechargeCount() == 0 ?
|
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getShowRechargeCount()), 4, RoundingMode.DOWN));
|
|
return gamePromoteTotalSumVO;
|
|
return gamePromoteTotalSumVO;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -936,6 +953,10 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
amount_m3 AS trend_month3,
|
|
amount_m3 AS trend_month3,
|
|
amount_m6 AS trend_month6,
|
|
amount_m6 AS trend_month6,
|
|
amount_sum AS trend_total,
|
|
amount_sum AS trend_total,
|
|
|
|
+ round(if(first_new_user_amount_count > 0, cost / first_new_user_amount_count, 0), 4) as first_recharge_count_cost,
|
|
|
|
+ round(if(old_amount_count > 0, cost / old_amount_count, 0), 4) as old_user_recharge_count_cost,
|
|
|
|
+ round(if(amount_count > 0, cost / amount_count, 0), 4) as show_recharge_count_cost,
|
|
|
|
+ round(if(new_user_total_amount_count > 0, cost / new_user_total_amount_count, 0), 4) as new_user_recharge_count_cost,
|
|
hundred_user_num,
|
|
hundred_user_num,
|
|
hundred_user_num_cost
|
|
hundred_user_num_cost
|
|
from
|
|
from
|
|
@@ -956,27 +977,27 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
sum(click_count) as click_count,
|
|
sum(click_count) as click_count,
|
|
sum(change_count) as convert_count,
|
|
sum(change_count) as convert_count,
|
|
round(if(sum(click_count) > 0, sum(change_count) / sum(click_count), 0), 4) as convert_rate,
|
|
round(if(sum(click_count) > 0, sum(change_count) / sum(click_count), 0), 4) as convert_rate,
|
|
- round(if(sum(change_count) > 0, sum(cost) / sum(change_count), 0), 2) as avg_convert_cost,
|
|
|
|
|
|
+ round(if(sum(change_count) > 0, sum(cost) / sum(change_count), 0), 4) as avg_convert_cost,
|
|
sum(depth_change_count) as deep_convert_count,
|
|
sum(depth_change_count) as deep_convert_count,
|
|
round(if(sum(change_count) > 0, sum(depth_change_count) / sum(change_count), 0), 4) as deep_convert_rate,
|
|
round(if(sum(change_count) > 0, sum(depth_change_count) / sum(change_count), 0), 4) as deep_convert_rate,
|
|
- round(if(sum(depth_change_count) > 0, sum(cost) / sum(depth_change_count), 0), 2) as deep_convert_cost,
|
|
|
|
- round(if(sum(view_count) > 0, sum(cost) / sum(view_count) * 1000, 0), 2) as thousand_view_cost,
|
|
|
|
|
|
+ round(if(sum(depth_change_count) > 0, sum(cost) / sum(depth_change_count), 0), 4) as deep_convert_cost,
|
|
|
|
+ round(if(sum(view_count) > 0, sum(cost) / sum(view_count) * 1000, 0), 4) as thousand_view_cost,
|
|
round(if(sum(view_count) > 0, sum(click_count) / sum(view_count), 0), 4) as click_rate,
|
|
round(if(sum(view_count) > 0, sum(click_count) / sum(view_count), 0), 4) as click_rate,
|
|
round(if(sum(click_count) > 0, sum(cost) / sum(click_count), 0), 2) as avg_click_cost,
|
|
round(if(sum(click_count) > 0, sum(cost) / sum(click_count), 0), 2) as avg_click_cost,
|
|
sum(download_start) as app_download_count,
|
|
sum(download_start) as app_download_count,
|
|
- round(if(sum(download_start) > 0, sum(cost) / sum(download_start), 0), 2) as app_download_cost,
|
|
|
|
|
|
+ round(if(sum(download_start) > 0, sum(cost) / sum(download_start), 0), 4) as app_download_cost,
|
|
round(if(sum(click_count) > 0, sum(download_start) / sum(click_count), 0), 4) as app_download_rate,
|
|
round(if(sum(click_count) > 0, sum(download_start) / sum(click_count), 0), 4) as app_download_rate,
|
|
sum(download_finish) as download_finish,
|
|
sum(download_finish) as download_finish,
|
|
- round(if(sum(download_finish) > 0, sum(cost) / sum(download_finish), 0), 2) as download_finish_cost,
|
|
|
|
|
|
+ round(if(sum(download_finish) > 0, sum(cost) / sum(download_finish), 0), 4) as download_finish_cost,
|
|
round(if(sum(download_start) > 0, sum(download_finish) / sum(download_start), 0), 4) as download_finish_rate,
|
|
round(if(sum(download_start) > 0, sum(download_finish) / sum(download_start), 0), 4) as download_finish_rate,
|
|
sum(install_finish) as app_install_count,
|
|
sum(install_finish) as app_install_count,
|
|
- round(if(sum(install_finish) > 0, sum(cost) / sum(install_finish), 0), 2) as app_install_cost,
|
|
|
|
|
|
+ round(if(sum(install_finish) > 0, sum(cost) / sum(install_finish), 0), 4) as app_install_cost,
|
|
round(if(sum(download_finish) > 0, sum(install_finish) / sum(download_finish), 0), 4) as app_install_rate,
|
|
round(if(sum(download_finish) > 0, sum(install_finish) / sum(download_finish), 0), 4) as app_install_rate,
|
|
sum(active) as app_active_count,
|
|
sum(active) as app_active_count,
|
|
- round(if(sum(active) > 0, sum(cost) / sum(active), 0), 2) as app_active_cost,
|
|
|
|
|
|
+ round(if(sum(active) > 0, sum(cost) / sum(active), 0), 4) as app_active_cost,
|
|
round(if(sum(click_count) > 0, sum(active) / sum(click_count), 0), 4) as app_active_rate,
|
|
round(if(sum(click_count) > 0, sum(active) / sum(click_count), 0), 4) as app_active_rate,
|
|
sum(register_num) as reg_user_count,
|
|
sum(register_num) as reg_user_count,
|
|
- round(if(sum(register_num) > 0, sum(cost) / sum(register_num), 0), 2) as reg_cost,
|
|
|
|
|
|
+ round(if(sum(register_num) > 0, sum(cost) / sum(register_num), 0), 4) as reg_cost,
|
|
sum(first_new_user_amount_count) as first_user_recharge_count,
|
|
sum(first_new_user_amount_count) as first_user_recharge_count,
|
|
sum(first_new_user_amount_num) as first_user_recharge_user,
|
|
sum(first_new_user_amount_num) as first_user_recharge_user,
|
|
sum(first_new_user_amount) as first_user_recharge_money,
|
|
sum(first_new_user_amount) as first_user_recharge_money,
|
|
@@ -1007,15 +1028,19 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
round(if(sum(first_new_user_amount_count) > 0, sum(first_new_user_amount) / sum(first_new_user_amount_count), 0), 4) as avg_first_user_recharge,
|
|
round(if(sum(first_new_user_amount_count) > 0, sum(first_new_user_amount) / sum(first_new_user_amount_count), 0), 4) as avg_first_user_recharge,
|
|
round(if(sum(buy_new_user_total_amount_count) > 0, sum(buy_new_user_total_amount) / sum(buy_new_user_total_amount_count), 0), 4) as avg_buy_user_recharge,
|
|
round(if(sum(buy_new_user_total_amount_count) > 0, sum(buy_new_user_total_amount) / sum(buy_new_user_total_amount_count), 0), 4) as avg_buy_user_recharge,
|
|
round(if(sum(amount_count) > 0, sum(amount) / sum(amount_count), 0), 4) as avg_show_user_recharge,
|
|
round(if(sum(amount_count) > 0, sum(amount) / sum(amount_count), 0), 4) as avg_show_user_recharge,
|
|
- round(if(sum(first_new_user_amount_num) > 0, sum(cost) / sum(first_new_user_amount_num), 0), 2) as first_recharge_cost,
|
|
|
|
- round(if(sum(buy_new_user_total_amount_num) > 0, sum(cost) / sum(buy_new_user_total_amount_num), 0), 2) as buy_user_recharge_cost,
|
|
|
|
|
|
+ round(if(sum(first_new_user_amount_num) > 0, sum(cost) / sum(first_new_user_amount_num), 0), 4) as first_recharge_cost,
|
|
|
|
+ round(if(sum(buy_new_user_total_amount_num) > 0, sum(cost) / sum(buy_new_user_total_amount_num), 0), 4) as buy_user_recharge_cost,
|
|
round(if(sum(new_user_total_amount_num) > 0, sum(reg_order_user_again) / sum(new_user_total_amount_num), 0), 4) as repeat_recharge_rate,
|
|
round(if(sum(new_user_total_amount_num) > 0, sum(reg_order_user_again) / sum(new_user_total_amount_num), 0), 4) as repeat_recharge_rate,
|
|
round(if(sum(register_num) > 0, sum(new_user_total_amount) / sum(register_num), 0), 4) as new_reg_arpu,
|
|
round(if(sum(register_num) > 0, sum(new_user_total_amount) / sum(register_num), 0), 4) as new_reg_arpu,
|
|
round(if(sum(first_new_user_amount_num) > 0, sum(first_new_user_amount) / sum(first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
round(if(sum(first_new_user_amount_num) > 0, sum(first_new_user_amount) / sum(first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
round(if(sum(new_user_total_amount_num) > 0, sum(new_user_total_amount) / sum(new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
round(if(sum(new_user_total_amount_num) > 0, sum(new_user_total_amount) / sum(new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
round(if(sum(amount_num) > 0, sum(amount) / sum(amount_num), 0), 4) as show_recharge_arpu,
|
|
round(if(sum(amount_num) > 0, sum(amount) / sum(amount_num), 0), 4) as show_recharge_arpu,
|
|
|
|
+ round(if(sum(first_new_user_amount_count) > 0, sum(cost) / sum(first_new_user_amount_count), 0), 4) as first_recharge_count_cost,
|
|
|
|
+ round(if(sum(old_amount_count) > 0, sum(cost) / sum(old_amount_count), 0), 4) as old_user_recharge_count_cost,
|
|
|
|
+ round(if(sum(amount_count) > 0, sum(cost) / sum(amount_count), 0), 4) as show_recharge_count_cost,
|
|
|
|
+ round(if(sum(new_user_total_amount_count) > 0, sum(cost) / sum(new_user_total_amount_count), 0), 4) as new_user_recharge_count_cost,
|
|
sum(hundred_user_num) as hundred_user_num,
|
|
sum(hundred_user_num) as hundred_user_num,
|
|
- round(if(sum(hundred_user_num) > 0, sum(cost) / sum(hundred_user_num), 0), 2) as hundred_user_num_cost
|
|
|
|
|
|
+ round(if(sum(hundred_user_num) > 0, sum(cost) / sum(hundred_user_num), 0), 4) as hundred_user_num_cost
|
|
from
|
|
from
|
|
ads_account_agent_day
|
|
ads_account_agent_day
|
|
""";
|
|
""";
|
|
@@ -1049,27 +1074,27 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
sum(a.click_count) as click_count,
|
|
sum(a.click_count) as click_count,
|
|
sum(a.change_count) as convert_count,
|
|
sum(a.change_count) as convert_count,
|
|
round(if(sum(a.click_count) > 0, sum(a.change_count) / sum(a.click_count), 0), 4) as convert_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.change_count) / sum(a.click_count), 0), 4) as convert_rate,
|
|
- round(if(sum(a.change_count) > 0, sum(a.cost) / sum(a.change_count), 0), 2) as avg_convert_cost,
|
|
|
|
|
|
+ round(if(sum(a.change_count) > 0, sum(a.cost) / sum(a.change_count), 0), 4) as avg_convert_cost,
|
|
sum(a.depth_change_count) as deep_convert_count,
|
|
sum(a.depth_change_count) as deep_convert_count,
|
|
round(if(sum(a.change_count) > 0, sum(a.depth_change_count) / sum(a.change_count), 0), 4) as deep_convert_rate,
|
|
round(if(sum(a.change_count) > 0, sum(a.depth_change_count) / sum(a.change_count), 0), 4) as deep_convert_rate,
|
|
- round(if(sum(a.depth_change_count) > 0, sum(a.cost) / sum(a.depth_change_count), 0), 2) as deep_convert_cost,
|
|
|
|
- round(if(sum(a.view_count) > 0, sum(a.cost) / sum(a.view_count) * 1000, 0), 2) as thousand_view_cost,
|
|
|
|
|
|
+ round(if(sum(a.depth_change_count) > 0, sum(a.cost) / sum(a.depth_change_count), 0), 4) as deep_convert_cost,
|
|
|
|
+ round(if(sum(a.view_count) > 0, sum(a.cost) / sum(a.view_count) * 1000, 0), 4) as thousand_view_cost,
|
|
round(if(sum(a.view_count) > 0, sum(a.click_count) / sum(a.view_count), 0), 4) as click_rate,
|
|
round(if(sum(a.view_count) > 0, sum(a.click_count) / sum(a.view_count), 0), 4) as click_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.cost) / sum(a.click_count), 0), 2) as avg_click_cost,
|
|
round(if(sum(a.click_count) > 0, sum(a.cost) / sum(a.click_count), 0), 2) as avg_click_cost,
|
|
sum(a.download_start) as app_download_count,
|
|
sum(a.download_start) as app_download_count,
|
|
- round(if(sum(a.download_start) > 0, sum(a.cost) / sum(a.download_start), 0), 2) as app_download_cost,
|
|
|
|
|
|
+ round(if(sum(a.download_start) > 0, sum(a.cost) / sum(a.download_start), 0), 4) as app_download_cost,
|
|
round(if(sum(a.click_count) > 0, sum(a.download_start) / sum(a.click_count), 0), 4) as app_download_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.download_start) / sum(a.click_count), 0), 4) as app_download_rate,
|
|
sum(a.download_finish) as download_finish,
|
|
sum(a.download_finish) as download_finish,
|
|
- round(if(sum(a.download_finish) > 0, sum(a.cost) / sum(a.download_finish), 0), 2) as download_finish_cost,
|
|
|
|
|
|
+ round(if(sum(a.download_finish) > 0, sum(a.cost) / sum(a.download_finish), 0), 4) as download_finish_cost,
|
|
round(if(sum(a.download_start) > 0, sum(a.download_finish) / sum(a.download_start), 0), 4) as download_finish_rate,
|
|
round(if(sum(a.download_start) > 0, sum(a.download_finish) / sum(a.download_start), 0), 4) as download_finish_rate,
|
|
sum(a.install_finish) as app_install_count,
|
|
sum(a.install_finish) as app_install_count,
|
|
- round(if(sum(a.install_finish) > 0, sum(a.cost) / sum(a.install_finish), 0), 2) as app_install_cost,
|
|
|
|
|
|
+ round(if(sum(a.install_finish) > 0, sum(a.cost) / sum(a.install_finish), 0), 4) as app_install_cost,
|
|
round(if(sum(a.download_finish) > 0, sum(a.install_finish) / sum(a.download_finish), 0), 4) as app_install_rate,
|
|
round(if(sum(a.download_finish) > 0, sum(a.install_finish) / sum(a.download_finish), 0), 4) as app_install_rate,
|
|
sum(a.active) as app_active_count,
|
|
sum(a.active) as app_active_count,
|
|
- round(if(sum(a.active) > 0, sum(a.cost) / sum(a.active), 0), 2) as app_active_cost,
|
|
|
|
|
|
+ round(if(sum(a.active) > 0, sum(a.cost) / sum(a.active), 0), 4) as app_active_cost,
|
|
round(if(sum(a.click_count) > 0, sum(a.active) / sum(a.click_count), 0), 4) as app_active_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.active) / sum(a.click_count), 0), 4) as app_active_rate,
|
|
sum(a.register_num) as reg_user_count,
|
|
sum(a.register_num) as reg_user_count,
|
|
- round(if(sum(a.register_num) > 0, sum(a.cost) / sum(a.register_num), 0), 2) as reg_cost,
|
|
|
|
|
|
+ round(if(sum(a.register_num) > 0, sum(a.cost) / sum(a.register_num), 0), 4) as reg_cost,
|
|
sum(a.first_new_user_amount_count) as first_user_recharge_count,
|
|
sum(a.first_new_user_amount_count) as first_user_recharge_count,
|
|
sum(a.first_new_user_amount_num) as first_user_recharge_user,
|
|
sum(a.first_new_user_amount_num) as first_user_recharge_user,
|
|
sum(a.first_new_user_amount) as first_user_recharge_money,
|
|
sum(a.first_new_user_amount) as first_user_recharge_money,
|
|
@@ -1097,14 +1122,16 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount_num) / sum(a.register_num), 0), 4) as today_recharge_rate,
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount_num) / sum(a.register_num), 0), 4) as today_recharge_rate,
|
|
round(if(sum(a.first_new_user_amount_count) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_count), 0), 4) as avg_first_user_recharge,
|
|
round(if(sum(a.first_new_user_amount_count) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_count), 0), 4) as avg_first_user_recharge,
|
|
round(if(sum(a.new_user_total_amount_count) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_count), 0), 4) as avg_today_recharge,
|
|
round(if(sum(a.new_user_total_amount_count) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_count), 0), 4) as avg_today_recharge,
|
|
- round(if(sum(a.first_new_user_amount_num) > 0, sum(a.cost) / sum(a.first_new_user_amount_num), 0), 2) as first_recharge_cost,
|
|
|
|
- round(if(sum(a.new_user_total_amount_num) > 0, sum(a.cost) / sum(a.new_user_total_amount_num), 0), 2) as today_recharge_cost,
|
|
|
|
|
|
+ round(if(sum(a.first_new_user_amount_num) > 0, sum(a.cost) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_cost,
|
|
|
|
+ round(if(sum(a.new_user_total_amount_num) > 0, sum(a.cost) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_cost,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.reg_order_user_again) / sum(a.new_user_total_amount_num), 0), 4) as today_repeat_recharge_rate,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.reg_order_user_again) / sum(a.new_user_total_amount_num), 0), 4) as today_repeat_recharge_rate,
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount) / sum(a.register_num), 0), 4) as new_reg_arpu,
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount) / sum(a.register_num), 0), 4) as new_reg_arpu,
|
|
round(if(sum(a.first_new_user_amount_num) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
round(if(sum(a.first_new_user_amount_num) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
|
|
+ round(if(sum(first_new_user_amount_count) > 0, sum(cost) / sum(first_new_user_amount_count), 0), 4) as first_recharge_count_cost,
|
|
|
|
+ round(if(sum(new_user_total_amount_count) > 0, sum(cost) / sum(new_user_total_amount_count), 0), 4) as new_user_recharge_count_cost,
|
|
sum(a.hundred_user_num) as hundred_user_num,
|
|
sum(a.hundred_user_num) as hundred_user_num,
|
|
- round(if(sum(a.hundred_user_num) > 0, sum(a.cost) / sum(a.hundred_user_num), 0), 2) as hundred_user_num_cost
|
|
|
|
|
|
+ round(if(sum(a.hundred_user_num) > 0, sum(a.cost) / sum(a.hundred_user_num), 0), 4) as hundred_user_num_cost
|
|
from
|
|
from
|
|
ads_account_agent_day a
|
|
ads_account_agent_day a
|
|
""";
|
|
""";
|
|
@@ -1135,27 +1162,27 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
sum(a.click_count) as click_count,
|
|
sum(a.click_count) as click_count,
|
|
sum(a.change_count) as convert_count,
|
|
sum(a.change_count) as convert_count,
|
|
round(if(sum(a.click_count) > 0, sum(a.change_count) / sum(a.click_count), 0), 4) as convert_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.change_count) / sum(a.click_count), 0), 4) as convert_rate,
|
|
- round(if(sum(a.change_count) > 0, sum(a.cost) / sum(a.change_count), 0), 2) as avg_convert_cost,
|
|
|
|
|
|
+ round(if(sum(a.change_count) > 0, sum(a.cost) / sum(a.change_count), 0), 4) as avg_convert_cost,
|
|
sum(a.depth_change_count) as deep_convert_count,
|
|
sum(a.depth_change_count) as deep_convert_count,
|
|
round(if(sum(a.change_count) > 0, sum(a.depth_change_count) / sum(a.change_count), 0), 4) as deep_convert_rate,
|
|
round(if(sum(a.change_count) > 0, sum(a.depth_change_count) / sum(a.change_count), 0), 4) as deep_convert_rate,
|
|
- round(if(sum(a.depth_change_count) > 0, sum(a.cost) / sum(a.depth_change_count), 0), 2) as deep_convert_cost,
|
|
|
|
- round(if(sum(a.view_count) > 0, sum(a.cost) / sum(a.view_count) * 1000, 0), 2) as thousand_view_cost,
|
|
|
|
|
|
+ round(if(sum(a.depth_change_count) > 0, sum(a.cost) / sum(a.depth_change_count), 0), 4) as deep_convert_cost,
|
|
|
|
+ round(if(sum(a.view_count) > 0, sum(a.cost) / sum(a.view_count) * 1000, 0), 4) as thousand_view_cost,
|
|
round(if(sum(a.view_count) > 0, sum(a.click_count) / sum(a.view_count), 0), 4) as click_rate,
|
|
round(if(sum(a.view_count) > 0, sum(a.click_count) / sum(a.view_count), 0), 4) as click_rate,
|
|
- round(if(sum(a.click_count) > 0, sum(a.cost) / sum(a.click_count), 0), 2) as avg_click_cost,
|
|
|
|
|
|
+ round(if(sum(a.click_count) > 0, sum(a.cost) / sum(a.click_count), 0), 4) as avg_click_cost,
|
|
sum(a.download_start) as app_download_count,
|
|
sum(a.download_start) as app_download_count,
|
|
- round(if(sum(a.download_start) > 0, sum(a.cost) / sum(a.download_start), 0), 2) as app_download_cost,
|
|
|
|
|
|
+ round(if(sum(a.download_start) > 0, sum(a.cost) / sum(a.download_start), 0), 4) as app_download_cost,
|
|
round(if(sum(a.click_count) > 0, sum(a.download_start) / sum(a.click_count), 0), 4) as app_download_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.download_start) / sum(a.click_count), 0), 4) as app_download_rate,
|
|
sum(a.download_finish) as download_finish,
|
|
sum(a.download_finish) as download_finish,
|
|
- round(if(sum(a.download_finish) > 0, sum(a.cost) / sum(a.download_finish), 0), 2) as download_finish_cost,
|
|
|
|
|
|
+ round(if(sum(a.download_finish) > 0, sum(a.cost) / sum(a.download_finish), 0), 4) as download_finish_cost,
|
|
round(if(sum(a.download_start) > 0, sum(a.download_finish) / sum(a.download_start), 0), 4) as download_finish_rate,
|
|
round(if(sum(a.download_start) > 0, sum(a.download_finish) / sum(a.download_start), 0), 4) as download_finish_rate,
|
|
sum(a.install_finish) as app_install_count,
|
|
sum(a.install_finish) as app_install_count,
|
|
- round(if(sum(a.install_finish) > 0, sum(a.cost) / sum(a.install_finish), 0), 2) as app_install_cost,
|
|
|
|
|
|
+ round(if(sum(a.install_finish) > 0, sum(a.cost) / sum(a.install_finish), 0), 4) as app_install_cost,
|
|
round(if(sum(a.download_finish) > 0, sum(a.install_finish) / sum(a.download_finish), 0), 4) as app_install_rate,
|
|
round(if(sum(a.download_finish) > 0, sum(a.install_finish) / sum(a.download_finish), 0), 4) as app_install_rate,
|
|
sum(a.active) as app_active_count,
|
|
sum(a.active) as app_active_count,
|
|
- round(if(sum(a.active) > 0, sum(a.cost) / sum(a.active), 0), 2) as app_active_cost,
|
|
|
|
|
|
+ round(if(sum(a.active) > 0, sum(a.cost) / sum(a.active), 0), 4) as app_active_cost,
|
|
round(if(sum(a.click_count) > 0, sum(a.active) / sum(a.click_count), 0), 4) as app_active_rate,
|
|
round(if(sum(a.click_count) > 0, sum(a.active) / sum(a.click_count), 0), 4) as app_active_rate,
|
|
sum(a.register_num) as reg_user_count,
|
|
sum(a.register_num) as reg_user_count,
|
|
- round(if(sum(a.register_num) > 0, sum(a.cost) / sum(a.register_num), 0), 2) as reg_cost,
|
|
|
|
|
|
+ round(if(sum(a.register_num) > 0, sum(a.cost) / sum(a.register_num), 0), 4) as reg_cost,
|
|
sum(a.first_new_user_amount_count) as first_user_recharge_count,
|
|
sum(a.first_new_user_amount_count) as first_user_recharge_count,
|
|
sum(a.first_new_user_amount_num) as first_user_recharge_user,
|
|
sum(a.first_new_user_amount_num) as first_user_recharge_user,
|
|
sum(a.first_new_user_amount) as first_user_recharge_money,
|
|
sum(a.first_new_user_amount) as first_user_recharge_money,
|
|
@@ -1183,14 +1210,16 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount_num) / sum(a.register_num), 0), 4) as today_recharge_rate,
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount_num) / sum(a.register_num), 0), 4) as today_recharge_rate,
|
|
round(if(sum(a.first_new_user_amount_count) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_count), 0), 4) as avg_first_user_recharge,
|
|
round(if(sum(a.first_new_user_amount_count) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_count), 0), 4) as avg_first_user_recharge,
|
|
round(if(sum(a.new_user_total_amount_count) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_count), 0), 4) as avg_today_recharge,
|
|
round(if(sum(a.new_user_total_amount_count) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_count), 0), 4) as avg_today_recharge,
|
|
- round(if(sum(a.first_new_user_amount_num) > 0, sum(a.cost) / sum(a.first_new_user_amount_num), 0), 2) as first_recharge_cost,
|
|
|
|
- round(if(sum(a.new_user_total_amount_num) > 0, sum(a.cost) / sum(a.new_user_total_amount_num), 0), 2) as today_recharge_cost,
|
|
|
|
|
|
+ round(if(sum(a.first_new_user_amount_num) > 0, sum(a.cost) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_cost,
|
|
|
|
+ round(if(sum(a.new_user_total_amount_num) > 0, sum(a.cost) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_cost,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.reg_order_user_again) / sum(a.new_user_total_amount_num), 0), 4) as today_repeat_recharge_rate,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.reg_order_user_again) / sum(a.new_user_total_amount_num), 0), 4) as today_repeat_recharge_rate,
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount) / sum(a.register_num), 0), 4) as new_reg_arpu,
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount) / sum(a.register_num), 0), 4) as new_reg_arpu,
|
|
round(if(sum(a.first_new_user_amount_num) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
round(if(sum(a.first_new_user_amount_num) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
|
|
+ round(if(sum(first_new_user_amount_count) > 0, sum(cost) / sum(first_new_user_amount_count), 0), 4) as first_recharge_count_cost,
|
|
|
|
+ round(if(sum(new_user_total_amount_count) > 0, sum(cost) / sum(new_user_total_amount_count), 0), 4) as new_user_recharge_count_cost,
|
|
sum(a.hundred_user_num) as hundred_user_num,
|
|
sum(a.hundred_user_num) as hundred_user_num,
|
|
- round(if(sum(a.hundred_user_num) > 0, sum(a.cost) / sum(a.hundred_user_num), 0), 2) as hundred_user_num_cost
|
|
|
|
|
|
+ round(if(sum(a.hundred_user_num) > 0, sum(a.cost) / sum(a.hundred_user_num), 0), 4) as hundred_user_num_cost
|
|
from
|
|
from
|
|
ads_account_agent_day a
|
|
ads_account_agent_day a
|
|
""";
|
|
""";
|