|
@@ -1015,6 +1015,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
|
|
|
game_pay_count,
|
|
|
ROUND(IF(game_pay_count > 0, today_cost / game_pay_count, 0), 2) as game_pay_count_cost,
|
|
|
ltv_day1,
|
|
|
+ ROUND(IF(reg_num > 0, first_new_user_amount / reg_num, 0), 2) as ltv_day1_actual_data,
|
|
|
sub_order_num,
|
|
|
sub_order_amount,
|
|
|
ROUND(IF(first_new_user_amount_count > 0, today_cost / first_new_user_amount_count, 0), 2) as first_new_user_amount_count_cost,
|
|
@@ -1123,6 +1124,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
|
|
|
SUM(game_pay_count) as game_pay_count,
|
|
|
ROUND(IF(SUM(game_pay_count) > 0, SUM(today_cost) / SUM(game_pay_count), 0), 2) as game_pay_count_cost,
|
|
|
ROUND(IF(SUM(reg_num) > 0, SUM(first_attribution_game_in_app_ltv1day) / SUM(reg_num), 0), 2) as ltv_day1,
|
|
|
+ ROUND(IF(SUM(reg_num) > 0, SUM(first_new_user_amount) / SUM(reg_num), 0), 2) as ltv_day1_actual_data,
|
|
|
(SUM(first_new_user_amount_count) - SUM(first_sub_amount_count)) as sub_order_num,
|
|
|
(SUM(first_new_user_amount) - SUM(first_sub_amount)) as sub_order_amount,
|
|
|
ROUND(IF(SUM(first_new_user_amount_count) > 0, SUM(today_cost) / SUM(first_new_user_amount_count), 0), 2) as first_new_user_amount_count_cost,
|
|
@@ -1250,6 +1252,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
|
|
|
SUM(game_pay_count) as game_pay_count,
|
|
|
ROUND(IF(SUM(game_pay_count) > 0, SUM(today_cost) / SUM(game_pay_count), 0), 2) as game_pay_count_cost,
|
|
|
ROUND(IF(SUM(reg_num) > 0, SUM(first_attribution_game_in_app_ltv1day) / SUM(reg_num), 0), 2) as ltv_day1,
|
|
|
+ ROUND(IF(SUM(reg_num) > 0, SUM(first_new_user_amount) / SUM(reg_num), 0), 2) as ltv_day1_actual_data,
|
|
|
(SUM(first_new_user_amount_count) - SUM(first_sub_amount_count)) as sub_order_num,
|
|
|
(SUM(first_new_user_amount) - SUM(first_sub_amount)) as sub_order_amount,
|
|
|
ROUND(IF(SUM(first_new_user_amount_count) > 0, SUM(today_cost) / SUM(first_new_user_amount_count), 0), 2) as first_new_user_amount_count_cost,
|
|
@@ -1403,16 +1406,32 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
|
|
|
d3,
|
|
|
d7,
|
|
|
d15,
|
|
|
- active,
|
|
|
- active_cost,
|
|
|
- first_convert_count,
|
|
|
- first_convert_cost,
|
|
|
- first_active_pay_rate,
|
|
|
- first_attribution_game_in_app_ltv1day,
|
|
|
- first_attribution_game_in_app_roi1day,
|
|
|
- game_pay_count,
|
|
|
- ROUND(IF(game_pay_count > 0, today_cost / game_pay_count, 0), 2) as game_pay_count_cost,
|
|
|
+ mini_game_register_users,
|
|
|
+ mini_game_register_cost,
|
|
|
+ mini_game_register_rate,
|
|
|
+ mini_game_paying_count,
|
|
|
+ mini_game_paying_amount,
|
|
|
+ mini_game_paying_users_d1,
|
|
|
+ mini_game_paying_amount_d1,
|
|
|
+ mini_game_paying_amount_d3,
|
|
|
+ mini_game_paying_amount_d7,
|
|
|
+ mini_game_paying_amount_d14,
|
|
|
+ mini_game_paying_amount_d30,
|
|
|
+ mini_game_first_paying_users,
|
|
|
+ mini_game_first_day_paying_roi,
|
|
|
+ mini_game_paying_roi,
|
|
|
+ mini_game_paying_arpu,
|
|
|
+ mini_game_pay_d3_roi,
|
|
|
+ mini_game_pay_d7_roi,
|
|
|
+ mini_game_pay_d14_roi,
|
|
|
+ mini_game_pay_d30_roi,
|
|
|
+ minigame1d_pay_count,
|
|
|
+ minigame24h_pay_uv,
|
|
|
+ minigame24h_pay_amount,
|
|
|
+ minigame24h_pay_roi,
|
|
|
+ minigame24h_pay_arpu,
|
|
|
ltv_day1,
|
|
|
+ ROUND(IF(reg_num > 0, first_new_user_amount / reg_num, 0), 2) as ltv_day1_actual_data,
|
|
|
sub_order_num,
|
|
|
sub_order_amount,
|
|
|
ROUND(IF(first_new_user_amount_count > 0, today_cost / first_new_user_amount_count, 0), 2) as first_new_user_amount_count_cost,
|
|
@@ -1506,21 +1525,37 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
|
|
|
round(if(SUM(reg_num) > 0, SUM(first_new_user_amount_num) / SUM(reg_num), 0), 4) as first_amount_rate,
|
|
|
round(if(SUM(first_new_user_amount_count) > 0, SUM(first_new_user_amount) / SUM(first_new_user_amount_count), 0), 2) as first_new_user_avg_price,
|
|
|
round(if(SUM(new_user_total_amount_count) > 0, SUM(new_user_total_amount) / SUM(new_user_total_amount_count), 0), 2) as new_user_total_avg_price,
|
|
|
- SUM(d1) as d1,
|
|
|
- SUM(d2) as d2,
|
|
|
- SUM(d3) as d3,
|
|
|
- SUM(d7) as d7,
|
|
|
- SUM(d15) as d15,
|
|
|
- IFNULL(SUM(active), 0) as active,
|
|
|
- ROUND(IF(SUM(active) > 0, SUM(today_cost) / SUM(active), 0), 2) as active_cost,
|
|
|
- IFNULL(SUM(first_convert_count), 0) as first_convert_count,
|
|
|
- ROUND(IF(SUM(first_convert_count) > 0, SUM(today_cost) / SUM(first_convert_count), 0), 2) as first_convert_cost,
|
|
|
- ROUND(IF(SUM(active) > 0, SUM(game_pay_count) / SUM(active), 0), 4) as first_active_pay_rate,
|
|
|
- SUM(first_attribution_game_in_app_ltv1day) as first_attribution_game_in_app_ltv1day,
|
|
|
- ROUND(IF(SUM(today_cost) > 0 , SUM(first_attribution_game_in_app_ltv1day) / SUM(today_cost), 0), 4) as first_attribution_game_in_app_roi1day,
|
|
|
- SUM(game_pay_count) as game_pay_count,
|
|
|
- ROUND(IF(SUM(game_pay_count) > 0, SUM(today_cost) / SUM(game_pay_count), 0), 2) as game_pay_count_cost,
|
|
|
- ROUND(IF(SUM(reg_num) > 0, SUM(first_attribution_game_in_app_ltv1day) / SUM(reg_num), 0), 2) as ltv_day1,
|
|
|
+ IFNULL(SUM(d1), 0) as d1,
|
|
|
+ IFNULL(SUM(d2), 0) as d2,
|
|
|
+ IFNULL(SUM(d3), 0) as d3,
|
|
|
+ IFNULL(SUM(d7), 0) as d7,
|
|
|
+ IFNULL(SUM(d15), 0) as d15,
|
|
|
+ IFNULL(SUM(mini_game_register_users), 0) as mini_game_register_users,
|
|
|
+ ROUND(IF(SUM(mini_game_register_users) > 0 , SUM(today_cost) / SUM(mini_game_register_users), 0), 2) as mini_game_register_cost,
|
|
|
+ ROUND(IF(SUM(click_count) > 0 , SUM(mini_game_register_users) / SUM(click_count), 0), 4) as mini_game_register_rate,
|
|
|
+ IFNULL(SUM(mini_game_paying_count), 0) as mini_game_paying_count,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount), 0) as mini_game_paying_amount,
|
|
|
+ IFNULL(SUM(mini_game_paying_users_d1), 0) as mini_game_paying_users_d1,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d1), 0) as mini_game_paying_amount_d1,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d3), 0) as mini_game_paying_amount_d3,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d7), 0) as mini_game_paying_amount_d7,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d14), 0) as mini_game_paying_amount_d14,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d30), 0) as mini_game_paying_amount_d30,
|
|
|
+ IFNULL(SUM(mini_game_first_paying_users), 0) as mini_game_first_paying_users,
|
|
|
+ ROUND(IF(SUM(today_cost) > 0 , SUM(mini_game_paying_amount) / SUM(today_cost), 0), 4) as mini_game_paying_roi,
|
|
|
+ ROUND(IF(SUM(mini_game_register_users) > 0 , SUM(mini_game_paying_amount) / SUM(mini_game_register_users), 0), 2) as mini_game_paying_arpu,
|
|
|
+ ROUND(IF(SUM(today_cost) > 0 , SUM(mini_game_paying_amount_d1) / SUM(today_cost), 0), 4) as mini_game_first_day_paying_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 2 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d3) / SUM(IF(DATE_ADD(dt, INTERVAL 2 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d3_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 6 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d7) / SUM(IF(DATE_ADD(dt, INTERVAL 6 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d7_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 13 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d14) / SUM(IF(DATE_ADD(dt, INTERVAL 13 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d14_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 29 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d30) / SUM(IF(DATE_ADD(dt, INTERVAL 29 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d30_roi,
|
|
|
+ IFNULL(SUM(minigame1d_pay_count), 0) as minigame1d_pay_count,
|
|
|
+ IFNULL(SUM(minigame24h_pay_uv), 0) as minigame24h_pay_uv,
|
|
|
+ IFNULL(SUM(minigame24h_pay_amount), 0) as minigame24h_pay_amount,
|
|
|
+ ROUND(IF(SUM(today_cost) > 0 , SUM(minigame24h_pay_amount) / SUM(today_cost), 0), 4) as minigame24h_pay_roi,
|
|
|
+ ROUND(IF(SUM(minigame24h_pay_uv) > 0 , SUM(minigame24h_pay_amount) / SUM(minigame24h_pay_uv), 0), 2) as minigame24h_pay_arpu,
|
|
|
+ ROUND(IF(SUM(reg_num) > 0, SUM(mini_game_paying_amount_d1) / SUM(reg_num), 0), 2) as ltv_day1,
|
|
|
+ ROUND(IF(SUM(reg_num) > 0, SUM(first_new_user_amount) / SUM(reg_num), 0), 2) as ltv_day1_actual_data,
|
|
|
(SUM(first_new_user_amount_count) - SUM(first_sub_amount_count)) as sub_order_num,
|
|
|
(SUM(first_new_user_amount) - SUM(first_sub_amount)) as sub_order_amount,
|
|
|
ROUND(IF(SUM(first_new_user_amount_count) > 0, SUM(today_cost) / SUM(first_new_user_amount_count), 0), 2) as first_new_user_amount_count_cost,
|
|
@@ -1638,16 +1673,32 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
|
|
|
IFNULL(SUM(d3), 0) as d3,
|
|
|
IFNULL(SUM(d7), 0) as d7,
|
|
|
IFNULL(SUM(d15), 0) as d15,
|
|
|
- IFNULL(SUM(active), 0) as active,
|
|
|
- ROUND(IF(SUM(active) > 0, SUM(today_cost) / SUM(active), 0), 2) as active_cost,
|
|
|
- IFNULL(SUM(first_convert_count), 0) as first_convert_count,
|
|
|
- ROUND(IF(SUM(first_convert_count) > 0, SUM(today_cost) / SUM(first_convert_count), 0), 2) as first_convert_cost,
|
|
|
- ROUND(IF(SUM(active) > 0, SUM(game_pay_count) / SUM(active), 0), 4) as first_active_pay_rate,
|
|
|
- SUM(first_attribution_game_in_app_ltv1day) as first_attribution_game_in_app_ltv1day,
|
|
|
- ROUND(IF(SUM(today_cost) > 0 , SUM(first_attribution_game_in_app_ltv1day) / SUM(today_cost), 0), 4) as first_attribution_game_in_app_roi1day,
|
|
|
- SUM(game_pay_count) as game_pay_count,
|
|
|
- ROUND(IF(SUM(game_pay_count) > 0, SUM(today_cost) / SUM(game_pay_count), 0), 2) as game_pay_count_cost,
|
|
|
- ROUND(IF(SUM(reg_num) > 0, SUM(first_attribution_game_in_app_ltv1day) / SUM(reg_num), 0), 2) as ltv_day1,
|
|
|
+ IFNULL(SUM(mini_game_register_users), 0) as mini_game_register_users,
|
|
|
+ ROUND(IF(SUM(mini_game_register_users) > 0 , SUM(today_cost) / SUM(mini_game_register_users), 0), 2) as mini_game_register_cost,
|
|
|
+ ROUND(IF(SUM(click_count) > 0 , SUM(mini_game_register_users) / SUM(click_count), 0), 4) as mini_game_register_rate,
|
|
|
+ IFNULL(SUM(mini_game_paying_count), 0) as mini_game_paying_count,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount), 0) as mini_game_paying_amount,
|
|
|
+ IFNULL(SUM(mini_game_paying_users_d1), 0) as mini_game_paying_users_d1,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d1), 0) as mini_game_paying_amount_d1,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d3), 0) as mini_game_paying_amount_d3,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d7), 0) as mini_game_paying_amount_d7,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d14), 0) as mini_game_paying_amount_d14,
|
|
|
+ IFNULL(SUM(mini_game_paying_amount_d30), 0) as mini_game_paying_amount_d30,
|
|
|
+ IFNULL(SUM(mini_game_first_paying_users), 0) as mini_game_first_paying_users,
|
|
|
+ ROUND(IF(SUM(today_cost) > 0 , SUM(mini_game_paying_amount) / SUM(today_cost), 0), 4) as mini_game_paying_roi,
|
|
|
+ ROUND(IF(SUM(mini_game_register_users) > 0 , SUM(mini_game_paying_amount) / SUM(mini_game_register_users), 0), 2) as mini_game_paying_arpu,
|
|
|
+ ROUND(IF(SUM(today_cost) > 0 , SUM(mini_game_paying_amount_d1) / SUM(today_cost), 0), 4) as mini_game_first_day_paying_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 2 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d3) / SUM(IF(DATE_ADD(dt, INTERVAL 2 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d3_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 6 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d7) / SUM(IF(DATE_ADD(dt, INTERVAL 6 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d7_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 13 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d14) / SUM(IF(DATE_ADD(dt, INTERVAL 13 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d14_roi,
|
|
|
+ ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 29 day) <= DATE(NOW()), today_cost, 0)) > 0 , SUM(mini_game_paying_amount_d30) / SUM(IF(DATE_ADD(dt, INTERVAL 29 day) <= DATE(NOW()), today_cost, 0)), 0), 4) as mini_game_pay_d30_roi,
|
|
|
+ IFNULL(SUM(minigame1d_pay_count), 0) as minigame1d_pay_count,
|
|
|
+ IFNULL(SUM(minigame24h_pay_uv), 0) as minigame24h_pay_uv,
|
|
|
+ IFNULL(SUM(minigame24h_pay_amount), 0) as minigame24h_pay_amount,
|
|
|
+ ROUND(IF(SUM(today_cost) > 0 , SUM(minigame24h_pay_amount) / SUM(today_cost), 0), 4) as minigame24h_pay_roi,
|
|
|
+ ROUND(IF(SUM(minigame24h_pay_uv) > 0 , SUM(minigame24h_pay_amount) / SUM(minigame24h_pay_uv), 0), 2) as minigame24h_pay_arpu,
|
|
|
+ ROUND(IF(SUM(reg_num) > 0, SUM(mini_game_paying_amount_d1) / SUM(reg_num), 0), 2) as ltv_day1,
|
|
|
+ ROUND(IF(SUM(reg_num) > 0, SUM(first_new_user_amount) / SUM(reg_num), 0), 2) as ltv_day1_actual_data,
|
|
|
(SUM(first_new_user_amount_count) - SUM(first_sub_amount_count)) as sub_order_num,
|
|
|
(SUM(first_new_user_amount) - SUM(first_sub_amount)) as sub_order_amount,
|
|
|
ROUND(IF(SUM(first_new_user_amount_count) > 0, SUM(today_cost) / SUM(first_new_user_amount_count), 0), 2) as first_new_user_amount_count_cost,
|