|
@@ -29,7 +29,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"点击数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"ctr\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.show_num) != 0 THEN concat(CAST(round( sum(t1.click) /sum(t1.show_num)*100,2) AS CHAR),'%') ELSE '0%' end as ctr \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.show_num) != 0 THEN concat(CAST(round( sum(t1.click) /sum(t1.show_num)*100,2) AS CHAR),'%') ELSE '0.00%' end as ctr \",\n" +
|
|
|
" \"comment\": \"点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"cpc\": {\n" +
|
|
@@ -45,7 +45,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"转化成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"convertRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.convert_num) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0%' end AS convertRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.convert_num) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS convertRate\",\n" +
|
|
|
" \"comment\": \"转化率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStart\": {\n" +
|
|
@@ -53,11 +53,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓开始下载数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.cost) / (t1.download_start) IS NULL THEN 0 ELSE sum(t1.cost) / sum(t1.download_start) end AS downloadStartCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / (t1.download_start) IS NULL THEN 0 ELSE ROUND(sum(t1.cost) / sum(t1.download_start),3) end AS downloadStartCost \",\n" +
|
|
|
" \"comment\": \"安卓开始下载成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0%' end AS downloadStartRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0.00%' end AS downloadStartRate \",\n" +
|
|
|
" \"comment\": \"安卓开始下载率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinish\": {\n" +
|
|
@@ -65,11 +65,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓下载完成数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.download_finish) IS NULL THEN 0 ELSE sum(t1.cost) / sum(t1.download_finish) end AS downloadFinishCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.download_finish) IS NULL THEN 0 ELSE ROUND(sum(t1.cost) / sum(t1.download_finish),3) end AS downloadFinishCost \",\n" +
|
|
|
" \"comment\": \"安卓下载完成成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_finish) != 0 THEN concat(CAST(round(sum(t1.install_finish) / sum(t1.download_finish)*100,2) AS CHAR) ,'%') ELSE '0%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_finish) != 0 THEN concat(CAST(round(sum(t1.install_finish) / sum(t1.download_finish)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
" \"comment\": \"安卓下载完成率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"active\": {\n" +
|
|
@@ -77,11 +77,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"激活数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.active) IS NULL THEN 0 ELSE sum(t1.cost) / sum(t1.active) end AS activeCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.active) IS NULL THEN 0 ELSE ROUND(sum(t1.cost) / sum(t1.active),3) end AS activeCost \",\n" +
|
|
|
" \"comment\": \"激活成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0%' end as activeRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as activeRate \",\n" +
|
|
|
" \"comment\": \"激活率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"register\": {\n" +
|
|
@@ -93,7 +93,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"注册成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRegisterRate\": {\n" +
|
|
|
- " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as activeRegisterRate \",\n" +
|
|
|
" \"comment\": \"注册率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpen\": {\n" +
|
|
@@ -105,7 +105,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"次留成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpenRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate \",\n" +
|
|
|
" \"comment\": \"次留率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activePayAmount\": {\n" +
|
|
@@ -175,11 +175,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"行为数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"clickRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.photo_show) != 0 THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.photo_show)) * 100,2) AS CHAR) ,'%') else '0%' END AS clickRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.photo_show) != 0 THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.photo_show)) * 100,2) AS CHAR) ,'%') else '0.00%' END AS clickRate \",\n" +
|
|
|
" \"comment\": \"封面点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"bClickRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.aclick) != 0 THEN CONCAT( CAST(ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2) AS CHAR) ,'%') ELSE '0%' END AS bClickRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.aclick) != 0 THEN CONCAT( CAST(ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2) AS CHAR) ,'%') ELSE '0.00%' END AS bClickRate \",\n" +
|
|
|
" \"comment\": \"行为率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"cpm\": {\n" +
|
|
@@ -199,11 +199,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓开始下载数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.charge) / (t1.download_started) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.download_started) end AS downloadStartCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.charge) / (t1.download_started) IS NULL THEN 0 ELSE round(sum(t1.charge) / sum(t1.download_started),3) end AS downloadStartCost \",\n" +
|
|
|
" \"comment\": \"安卓开始下载单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.download_started) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0%' end AS downloadStartRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.download_started) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0.00%' end AS downloadStartRate\",\n" +
|
|
|
" \"comment\": \"安卓开始下载率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinish\": {\n" +
|
|
@@ -211,11 +211,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓下载完成数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.download_completed) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.download_completed) end AS downloadFinishCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.download_completed) IS NULL THEN 0 ELSE round(sum(t1.charge) / sum(t1.download_completed),3) end AS downloadFinishCost \",\n" +
|
|
|
" \"comment\": \"安卓下载完成单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_started) != 0 then concat(CAST(round(sum(t1.download_completed) / sum(t1.download_started)*100,2) AS CHAR) ,'%') else '0%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_started) != 0 then concat(CAST(round(sum(t1.download_completed) / sum(t1.download_started)*100,2) AS CHAR) ,'%') else '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
" \"comment\": \"安卓下载完成率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"active\": {\n" +
|
|
@@ -223,7 +223,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"激活数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.activation) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.activation) end AS activeCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.activation) IS NULL THEN 0 ELSE round(sum(t1.charge) / sum(t1.activation),3) end AS activeCost \",\n" +
|
|
|
" \"comment\": \"激活单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"firstDayPay\": {\n" +
|
|
@@ -235,11 +235,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"首日付费金额\"\n" +
|
|
|
" },\n" +
|
|
|
" \"firstDayPayCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.event_pay_first_day) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.event_pay_first_day) end AS firstDayPayCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.event_pay_first_day) IS NULL THEN 0 ELSE round(sum(t1.charge) / sum(t1.event_pay_first_day),3) end AS firstDayPayCost \",\n" +
|
|
|
" \"comment\": \"首日付费成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"firstDayPayROI\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.event_pay_purchase_amount_first_day) / sum(t1.charge) IS NULL THEN '0%' ELSE concat(CAST(round(sum(t1.event_pay_purchase_amount_first_day) / sum(t1.charge)*100,2) AS CHAR) ,'%') end AS firstDayPayROI \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.event_pay_purchase_amount_first_day) / sum(t1.charge) IS NULL THEN '0.00%' ELSE concat(CAST(round(sum(t1.event_pay_purchase_amount_first_day) / sum(t1.charge)*100,2) AS CHAR) ,'%') end AS firstDayPayROI \",\n" +
|
|
|
" \"comment\": \"首日ROI\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventPay\": {\n" +
|
|
@@ -251,11 +251,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"付费金额\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventPayCost\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.event_pay) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.event_pay) end AS eventPayCost \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.event_pay) IS NULL THEN 0 ELSE round(sum(t1.charge) / sum(t1.event_pay),3) end AS eventPayCost \",\n" +
|
|
|
" \"comment\": \"付费次数成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"ROI\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.event_pay_purchase_amount) / sum(t1.charge) IS NULL THEN '0%' ELSE concat(CAST(round(sum(t1.event_pay_purchase_amount) / sum(t1.charge)*100,2) AS CHAR) ,'%') end AS ROI \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.event_pay_purchase_amount) / sum(t1.charge) IS NULL THEN '0.00%' ELSE concat(CAST(round(sum(t1.event_pay_purchase_amount) / sum(t1.charge)*100,2) AS CHAR) ,'%') end AS ROI \",\n" +
|
|
|
" \"comment\": \"ROI\"\n" +
|
|
|
" },\n" +
|
|
|
" \"register\": {\n" +
|
|
@@ -267,7 +267,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"注册成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRegisterRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) !=0 THEN concat(CAST(round(sum(t1.event_register) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) !=0 THEN concat(CAST(round(sum(t1.event_register) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0.00%' end as activeRegisterRate \",\n" +
|
|
|
" \"comment\": \"注册率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventJinJianApp\": {\n" +
|
|
@@ -295,7 +295,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"表单提交数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"formCountRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.form_count) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0%' end as formCountRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.form_count) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0.00%' end as formCountRate \",\n" +
|
|
|
" \"comment\": \"表单提交率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"formCountCost\": {\n" +
|
|
@@ -311,7 +311,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"次留成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpenRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate\",\n" +
|
|
|
" \"comment\": \"次留率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventJinJianLandingPage\": {\n" +
|
|
@@ -331,7 +331,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"落地页授信成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventCreditGrantLandingPageRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.event_jin_jian_landing_page) != 0 THEN concat( CAST(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0%' end as eventCreditGrantLandingPageRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.event_jin_jian_landing_page) != 0 THEN concat( CAST(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0.00%' end as eventCreditGrantLandingPageRate \",\n" +
|
|
|
" \"comment\": \"落地页授信率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"submit\": {\n" +
|
|
@@ -343,15 +343,23 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"按钮点击成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"submitRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.submit) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0%' end as submitRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.submit) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0.00%' end as submitRate \",\n" +
|
|
|
" \"comment\": \"按钮点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"play3sRate\": {\n" +
|
|
|
" \"filed\": \"(CASE WHEN sum(t1.aclick) != 0 THEN round( sum(t1.play_3s_ratio * t1.aclick) / sum(t1.aclick) * 100,2) ELSE 0 END )AS play3sRate \",\n" +
|
|
|
" \"comment\": \"3s播放率\"\n" +
|
|
|
" },\n" +
|
|
|
+ " \"keyAction\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.key_action),0) as keyAction \",\n" +
|
|
|
+ " \"comment\": \"关键行为数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"keyActionCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.charge) / sum(t1.key_action) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.key_action),3) end as keyActionCost \",\n" +
|
|
|
+ " \"comment\": \"关键行为成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
" \"activeRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_completed) != 0 THEN concat(CAST(round(sum(t1.activation) / sum(t1.download_completed)*100,2) AS CHAR) ,'%') else '0%' end as activeRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_completed) != 0 THEN concat(CAST(round(sum(t1.activation) / sum(t1.download_completed)*100,2) AS CHAR) ,'%') else '0.00%' end as activeRate \",\n" +
|
|
|
" \"comment\": \"下载完成激活率\"\n" +
|
|
|
" }\n" +
|
|
|
"}";
|
|
@@ -385,11 +393,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"行为数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"clickRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.photo_show) != 0 THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.photo_show)) * 100,2) AS CHAR) ,'%') else '0%' END AS clickRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.photo_show) != 0 THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.photo_show)) * 100,2) AS CHAR) ,'%') else '0.00%' END AS clickRate \",\n" +
|
|
|
" \"comment\": \"封面点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"bClickRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.aclick) != 0 THEN CONCAT( CAST(ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2) AS CHAR) ,'%') ELSE '0%' END AS bClickRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.aclick) != 0 THEN CONCAT( CAST(ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2) AS CHAR) ,'%') ELSE '0.00%' END AS bClickRate \",\n" +
|
|
|
" \"comment\": \"行为率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"cpm\": {\n" +
|
|
@@ -413,7 +421,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓开始下载单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.download_started) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0%' end AS downloadStartRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.download_started) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0.00%' end AS downloadStartRate\",\n" +
|
|
|
" \"comment\": \"安卓开始下载率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinish\": {\n" +
|
|
@@ -425,7 +433,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓下载完成单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_started) != 0 then concat(CAST(round(sum(t1.download_completed) / sum(t1.download_started)*100,2) AS CHAR) ,'%') else '0%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_started) != 0 then concat(CAST(round(sum(t1.download_completed) / sum(t1.download_started)*100,2) AS CHAR) ,'%') else '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
" \"comment\": \"安卓下载完成率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"active\": {\n" +
|
|
@@ -477,7 +485,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"注册成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRegisterRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) !=0 THEN concat(CAST(round(sum(t1.event_register) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) !=0 THEN concat(CAST(round(sum(t1.event_register) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0.00%' end as activeRegisterRate \",\n" +
|
|
|
" \"comment\": \"注册率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventJinJianApp\": {\n" +
|
|
@@ -505,7 +513,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"表单提交数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"formCountRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.form_count) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0%' end as formCountRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.form_count) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0.00%' end as formCountRate \",\n" +
|
|
|
" \"comment\": \"表单提交率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"formCountCost\": {\n" +
|
|
@@ -521,7 +529,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"次留成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpenRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate\",\n" +
|
|
|
" \"comment\": \"次留率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventJinJianLandingPage\": {\n" +
|
|
@@ -541,7 +549,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"落地页授信成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventCreditGrantLandingPageRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.event_jin_jian_landing_page) != 0 THEN concat( CAST(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0%' end as eventCreditGrantLandingPageRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.event_jin_jian_landing_page) != 0 THEN concat( CAST(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0.00%' end as eventCreditGrantLandingPageRate \",\n" +
|
|
|
" \"comment\": \"落地页授信率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"submit\": {\n" +
|
|
@@ -553,11 +561,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"按钮点击成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"submitRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.submit) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0%' end as submitRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.submit) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0.00%' end as submitRate \",\n" +
|
|
|
" \"comment\": \"按钮点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_completed) != 0 THEN concat(CAST(round(sum(t1.activation) / sum(t1.download_completed)*100,2) AS CHAR) ,'%') else '0%' end as activeRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_completed) != 0 THEN concat(CAST(round(sum(t1.activation) / sum(t1.download_completed)*100,2) AS CHAR) ,'%') else '0.00%' end as activeRate \",\n" +
|
|
|
" \"comment\": \"下载完成激活率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"play3sCount\": {\n" +
|
|
@@ -600,11 +608,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"行为数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"clickRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.`show`) != 0 THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.`show`)) * 100,2) AS CHAR) ,'%') else '0%' END AS clickRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.`show`) != 0 THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.`show`)) * 100,2) AS CHAR) ,'%') else '0.00%' END AS clickRate \",\n" +
|
|
|
" \"comment\": \"封面点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"bClickRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.aclick) != 0 THEN CONCAT( CAST(ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2) AS CHAR) ,'%') ELSE '0%' END AS bClickRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.aclick) != 0 THEN CONCAT( CAST(ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2) AS CHAR) ,'%') ELSE '0.00%' END AS bClickRate \",\n" +
|
|
|
" \"comment\": \"行为率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"cpm\": {\n" +
|
|
@@ -628,7 +636,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓开始下载单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.download_started) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0%' end AS downloadStartRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.download_started) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0.00%' end AS downloadStartRate\",\n" +
|
|
|
" \"comment\": \"安卓开始下载率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinish\": {\n" +
|
|
@@ -640,7 +648,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓下载完成单价\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_started) != 0 then concat(CAST(round(sum(t1.download_completed) / sum(t1.download_started)*100,2) AS CHAR) ,'%') else '0%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_started) != 0 then concat(CAST(round(sum(t1.download_completed) / sum(t1.download_started)*100,2) AS CHAR) ,'%') else '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
" \"comment\": \"安卓下载完成率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"active\": {\n" +
|
|
@@ -692,7 +700,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"注册成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRegisterRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) !=0 THEN concat(CAST(round(sum(t1.event_register) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) !=0 THEN concat(CAST(round(sum(t1.event_register) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0.00%' end as activeRegisterRate \",\n" +
|
|
|
" \"comment\": \"注册率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventJinJianApp\": {\n" +
|
|
@@ -720,7 +728,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"表单提交数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"formCountRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.form_count) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0%' end as formCountRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.form_count) / sum(t1.activation)*100,2) AS CHAR) ,'%') else '0.00%' end as formCountRate \",\n" +
|
|
|
" \"comment\": \"表单提交率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"formCountCost\": {\n" +
|
|
@@ -736,7 +744,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"次留成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpenRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.activation) != 0 THEN concat(CAST(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate\",\n" +
|
|
|
" \"comment\": \"次留率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventJinJianLandingPage\": {\n" +
|
|
@@ -756,7 +764,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"落地页授信成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"eventCreditGrantLandingPageRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.event_jin_jian_landing_page) != 0 THEN concat( CAST(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0%' end as eventCreditGrantLandingPageRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.event_jin_jian_landing_page) != 0 THEN concat( CAST(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0.00%' end as eventCreditGrantLandingPageRate \",\n" +
|
|
|
" \"comment\": \"落地页授信率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"submit\": {\n" +
|
|
@@ -768,11 +776,11 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"按钮点击成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"submitRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.event_button_click) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0%' end as submitRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.bclick) != 0 THEN concat(CAST(round(sum(t1.event_button_click) / sum(t1.bclick)*100,2) AS CHAR) ,'%') else '0.00%' end as submitRate \",\n" +
|
|
|
" \"comment\": \"按钮点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_completed) != 0 THEN concat(CAST(round(sum(t1.activation) / sum(t1.download_completed)*100,2) AS CHAR) ,'%') else '0%' end as activeRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_completed) != 0 THEN concat(CAST(round(sum(t1.activation) / sum(t1.download_completed)*100,2) AS CHAR) ,'%') else '0.00%' end as activeRate \",\n" +
|
|
|
" \"comment\": \"下载完成激活率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"play3sCount\": {\n" +
|
|
@@ -971,14 +979,17 @@ public class AccountReportConstants {
|
|
|
" \"play3sRate\": {\n" +
|
|
|
" \"comment\": \"3s播放率\"\n" +
|
|
|
" },\n" +
|
|
|
+ " \"keyAction\": {\n" +
|
|
|
+ " \"comment\": \"关键行为数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"keyActionCost\": {\n" +
|
|
|
+ " \"comment\": \"关键行为成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
" \"adScene\": {\n" +
|
|
|
" \"comment\": \"投放场景\"\n" +
|
|
|
" }\n" +
|
|
|
"}";
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- System.out.println(BYTEDANCE_VIDEO_REPORT_MAPPING_JSON);
|
|
|
- }
|
|
|
public static final String BYTEDANCE_VIDEO_REPORT_MAPPING_JSON = "{\n" +
|
|
|
" \"cost\": {\n" +
|
|
|
" \"filed\": \"IFNULL(sum(t1.cost),0) as cost \",\n" +
|
|
@@ -993,7 +1004,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"点击数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"ctr\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.material_show) != 0 THEN CONCAT(CAST(ROUND((sum(t1.click) / sum(t1.material_show)) * 100,2) AS CHAR) ,'%') ELSE '0%' end AS ctr\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.material_show) != 0 THEN CONCAT(CAST(ROUND((sum(t1.click) / sum(t1.material_show)) * 100,2) AS CHAR) ,'%') ELSE '0.00%' end AS ctr\",\n" +
|
|
|
" \"comment\": \"点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"cpc\": {\n" +
|
|
@@ -1009,7 +1020,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"转化成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"convertRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.material_show)!= 0 THEN concat(CAST(round(sum(t1.convert_material) / sum(t1.material_show)*100,2) AS CHAR) ,'%') ELSE '0%' end AS convertRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.material_show)!= 0 THEN concat(CAST(round(sum(t1.convert_material) / sum(t1.material_show)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS convertRate \",\n" +
|
|
|
" \"comment\": \"转化率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStart\": {\n" +
|
|
@@ -1021,7 +1032,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓开始下载成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0%' end AS downloadStartRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS downloadStartRate \",\n" +
|
|
|
" \"comment\": \"安卓开始下载率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinish\": {\n" +
|
|
@@ -1033,7 +1044,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓下载完成成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_finish) != 0 THEN concat(CAST(round(sum(t1.install_finish) / sum(t1.download_finish)*100,2) AS CHAR),'%') ELSE '0%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_finish) != 0 THEN concat(CAST(round(sum(t1.install_finish) / sum(t1.download_finish)*100,2) AS CHAR),'%') ELSE '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
" \"comment\": \"安卓下载完成率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"active\": {\n" +
|
|
@@ -1045,7 +1056,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"激活成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click)!= 0 THEN concat( CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0%' end as activeRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click)!= 0 THEN concat( CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0.00%' end as activeRate\",\n" +
|
|
|
" \"comment\": \"激活率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"register\": {\n" +
|
|
@@ -1057,7 +1068,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"注册成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRegisterRate\": {\n" +
|
|
|
- " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as activeRegisterRate \",\n" +
|
|
|
" \"comment\": \"注册率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"gameAddiction\": {\n" +
|
|
@@ -1069,7 +1080,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"关键行为成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"gameAddictionRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.game_addiction) / sum(t1.active)*100,2) AS CHAR),'%') ELSE '0%' end as gameAddictionRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.game_addiction) / sum(t1.active)*100,2) AS CHAR),'%') ELSE '0.00%' end as gameAddictionRate\",\n" +
|
|
|
" \"comment\": \"关键行为率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpen\": {\n" +
|
|
@@ -1081,7 +1092,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"次留成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpenRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate \",\n" +
|
|
|
" \"comment\": \"次留率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activePayAmount\": {\n" +
|
|
@@ -1136,6 +1147,163 @@ public class AccountReportConstants {
|
|
|
|
|
|
|
|
|
|
|
|
+ public static final String BYTEDANCE_VIDEO_REPORT_MAPPING_JSON2 = "{\n" +
|
|
|
+ " \"cost\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.cost),0) as cost \",\n" +
|
|
|
+ " \"comment\": \"消耗\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"cpm\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.`show`) IS NULL THEN 0 ELSE ROUND((sum(t1.cost) / sum(t1.`show`)) * 1000, 2 ) END AS cpm \",\n" +
|
|
|
+ " \"comment\": \"平均千次展现费用\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"clickMaterial\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.click),0) as clickMaterial \",\n" +
|
|
|
+ " \"comment\": \"点击数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"ctr\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.`show`) != 0 THEN CONCAT(CAST(ROUND((sum(t1.click) / sum(t1.`show`)) * 100,2) AS CHAR) ,'%') ELSE '0.00%' end AS ctr\",\n" +
|
|
|
+ " \"comment\": \"点击率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"cpc\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) / sum(t1.cost) IS NULL THEN 0 ELSE ROUND((sum(t1.cost) / sum(t1.click)), 2) END AS cpc \",\n" +
|
|
|
+ " \"comment\": \"平均点击单价\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"convertMaterial\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.`convert`),0) as convertMaterial \",\n" +
|
|
|
+ " \"comment\": \"转化数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"convertCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.`convert`) IS NULL THEN 0 ELSE ROUND((sum(t1.cost) / sum(t1.`convert`)), 2 ) END AS convertCost \",\n" +
|
|
|
+ " \"comment\": \"转化成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"convertRate\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.`show`)!= 0 THEN concat(CAST(round(sum(t1.`convert`) / sum(t1.`show`)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS convertRate \",\n" +
|
|
|
+ " \"comment\": \"转化率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"downloadStart\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(download_start),0) as downloadStart \",\n" +
|
|
|
+ " \"comment\": \"安卓开始下载数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"downloadStartCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / (t1.download_start) IS NULL THEN 0 ELSE ROUND(sum(t1.cost) / sum(t1.download_start),3) end AS downloadStartCost \",\n" +
|
|
|
+ " \"comment\": \"安卓开始下载成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"downloadStartRate\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS downloadStartRate \",\n" +
|
|
|
+ " \"comment\": \"安卓开始下载率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"downloadFinish\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.download_finish),0) as downloadFinish \",\n" +
|
|
|
+ " \"comment\": \"安卓下载完成数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"downloadFinishCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.download_finish) IS NULL THEN 0 ELSE ROUND(sum(t1.cost) / sum(t1.download_finish),3) end AS downloadFinishCost \",\n" +
|
|
|
+ " \"comment\": \"安卓下载完成成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"downloadFinishRate\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_finish) != 0 THEN concat(CAST(round(sum(t1.install_finish) / sum(t1.download_finish)*100,2) AS CHAR),'%') ELSE '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"comment\": \"安卓下载完成率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"active\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.active),0) as active \",\n" +
|
|
|
+ " \"comment\": \"激活数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"activeCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.active) IS NULL THEN 0 ELSE ROUND(sum(t1.cost) / sum(t1.active),3) end AS activeCost \",\n" +
|
|
|
+ " \"comment\": \"激活成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"activeRate\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click)!= 0 THEN concat( CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0.00%' end as activeRate\",\n" +
|
|
|
+ " \"comment\": \"激活率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"register\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.register),0) as register \",\n" +
|
|
|
+ " \"comment\": \"注册数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"activeRegisterCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.register) IS NULL THEN 0 ELSE round(sum(t1.cost)/sum(t1.register),3) end as activeRegisterCost \",\n" +
|
|
|
+ " \"comment\": \"注册成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"activeRegisterRate\": {\n" +
|
|
|
+ " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"comment\": \"注册率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"gameAddiction\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.game_addiction),0) as gameAddiction \",\n" +
|
|
|
+ " \"comment\": \"关键行为数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"gameAddictionCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.game_addiction) IS NULL THEN 0 ELSE round(sum(t1.cost)/sum(t1.game_addiction),3) end as gameAddictionCost \",\n" +
|
|
|
+ " \"comment\": \"关键行为成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"gameAddictionRate\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.game_addiction) / sum(t1.active)*100,2) AS CHAR),'%') ELSE '0.00%' end as gameAddictionRate\",\n" +
|
|
|
+ " \"comment\": \"关键行为率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"nextDayOpen\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.next_day_open),0) as nextDayOpen \",\n" +
|
|
|
+ " \"comment\": \"次留数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"nextDayOpenCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.next_day_open) IS NULL THEN 0 ELSE round(sum(t1.cost)/sum(t1.next_day_open),3) end as nextDayOpenCost \",\n" +
|
|
|
+ " \"comment\": \"次留成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"nextDayOpenRate\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate \",\n" +
|
|
|
+ " \"comment\": \"次留率\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"activePayAmount\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(pay_count),0) as activePayAmount \",\n" +
|
|
|
+ " \"comment\": \"付费数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"activePayCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.pay_count) IS NULL THEN 0 ELSE round(sum(t1.cost)/sum(t1.pay_count),3) end as activePayCost \",\n" +
|
|
|
+ " \"comment\": \"付费成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"form\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.form),0) as form \",\n" +
|
|
|
+ " \"comment\": \"表单提交\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"validPlayCost\": {\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.valid_play) IS NULL THEN 0 ELSE round(sum(t1.cost)/sum(t1.valid_play),3) end as validPlayCost \",\n" +
|
|
|
+ " \"comment\": \"有效播放成本\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"play25FeedBreak\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.play_25_feed_break),0) as play25FeedBreak \",\n" +
|
|
|
+ " \"comment\": \"25%进度播放数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"play50FeedBreak\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.play_50_feed_break),0) as play50FeedBreak\",\n" +
|
|
|
+ " \"comment\": \"50%进度播放数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"play75FeedBreak\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.play_75_feed_break),0) as play75FeedBreak\",\n" +
|
|
|
+ " \"comment\": \"75%进度播放数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"play100FeedBreak\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.play_100_feed_break),0) as play100FeedBreak\",\n" +
|
|
|
+ " \"comment\": \"100%进度播放数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"follow\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.follow),0) as follow \",\n" +
|
|
|
+ " \"comment\": \"新增关注数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"likeMaterial\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.`like`),0) as likeMaterial \",\n" +
|
|
|
+ " \"comment\": \"点赞数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"shareMaterial\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(sum(t1.share),0) as shareMaterial \",\n" +
|
|
|
+ " \"comment\": \"分享数\"\n" +
|
|
|
+ " },\n" +
|
|
|
+ " \"showMaterial\": {\n" +
|
|
|
+ " \"filed\": \"IFNULL(t1.`show`, 0 ) AS materialShow \",\n" +
|
|
|
+ " \"comment\": \"展示数\"\n" +
|
|
|
+ " }\n" +
|
|
|
+ "}";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static final String BYTEDANCE_VIDEO_REPORT_MAPPING_JSON_NEW = "{\n" +
|
|
|
" \"cost\": {\n" +
|
|
|
" \"filed\": \"IFNULL(sum(t1.cost),0) as cost \",\n" +
|
|
@@ -1150,7 +1318,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"点击数\"\n" +
|
|
|
" },\n" +
|
|
|
" \"ctr\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.`show`) != 0 THEN CONCAT(CAST(ROUND((sum(t1.click) / sum(t1.`show`)) * 100,2) AS CHAR) ,'%') ELSE '0%' end AS ctr\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.`show`) != 0 THEN CONCAT(CAST(ROUND((sum(t1.click) / sum(t1.`show`)) * 100,2) AS CHAR) ,'%') ELSE '0.00%' end AS ctr\",\n" +
|
|
|
" \"comment\": \"点击率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"cpc\": {\n" +
|
|
@@ -1166,7 +1334,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"转化成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"convertRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.`show`)!= 0 THEN concat(CAST(round(sum(t1.`convert`) / sum(t1.`show`)*100,2) AS CHAR) ,'%') ELSE '0%' end AS convertRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.`show`)!= 0 THEN concat(CAST(round(sum(t1.`convert`) / sum(t1.`show`)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS convertRate \",\n" +
|
|
|
" \"comment\": \"转化率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStart\": {\n" +
|
|
@@ -1178,7 +1346,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓开始下载成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadStartRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0%' end AS downloadStartRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click) != 0 THEN concat(CAST(round(sum(t1.download_start) / sum(t1.click)*100,2) AS CHAR) ,'%') ELSE '0.00%' end AS downloadStartRate \",\n" +
|
|
|
" \"comment\": \"安卓开始下载率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinish\": {\n" +
|
|
@@ -1190,7 +1358,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"安卓下载完成成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"downloadFinishRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.download_start) != 0 THEN concat(CAST(round(sum(t1.download_finish) / sum(t1.download_start)*100,2) AS CHAR),'%') ELSE '0%' end AS downloadFinishRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.download_start) != 0 THEN concat(CAST(round(sum(t1.download_finish) / sum(t1.download_start)*100,2) AS CHAR),'%') ELSE '0.00%' end AS downloadFinishRate \",\n" +
|
|
|
" \"comment\": \"安卓下载完成率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"active\": {\n" +
|
|
@@ -1202,7 +1370,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"激活成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.click)!= 0 THEN concat( CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0%' end as activeRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.click)!= 0 THEN concat( CAST(round(sum(t1.active) / sum(t1.click)*100,2) AS CHAR),'%') ELSE '0.00%' end as activeRate\",\n" +
|
|
|
" \"comment\": \"激活率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"register\": {\n" +
|
|
@@ -1214,7 +1382,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"注册成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activeRegisterRate\": {\n" +
|
|
|
- " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0%' end as activeRegisterRate \",\n" +
|
|
|
+ " \"filed\": \" CASE WHEN sum(t1.active) != 0 THEN concat(CAST(round(sum(t1.register) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as activeRegisterRate \",\n" +
|
|
|
" \"comment\": \"注册率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"gameAddiction\": {\n" +
|
|
@@ -1226,7 +1394,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"关键行为成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"gameAddictionRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.game_addiction) / sum(t1.active)*100,2) AS CHAR),'%') ELSE '0%' end as gameAddictionRate\",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.game_addiction) / sum(t1.active)*100,2) AS CHAR),'%') ELSE '0.00%' end as gameAddictionRate\",\n" +
|
|
|
" \"comment\": \"关键行为率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpen\": {\n" +
|
|
@@ -1238,7 +1406,7 @@ public class AccountReportConstants {
|
|
|
" \"comment\": \"次留成本\"\n" +
|
|
|
" },\n" +
|
|
|
" \"nextDayOpenRate\": {\n" +
|
|
|
- " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate \",\n" +
|
|
|
+ " \"filed\": \"CASE WHEN sum(t1.active)!= 0 THEN concat(CAST(round(sum(t1.next_day_open) / sum(t1.active)*100,2) AS CHAR) ,'%') ELSE '0.00%' end as nextDayOpenRate \",\n" +
|
|
|
" \"comment\": \"次留率\"\n" +
|
|
|
" },\n" +
|
|
|
" \"activePayAmount\": {\n" +
|
|
@@ -1302,6 +1470,10 @@ public class AccountReportConstants {
|
|
|
Object jsonByVideo = JSON.parseObject(BYTEDANCE_VIDEO_REPORT_MAPPING_JSON);
|
|
|
return JsonResourceUtil.jsonToMap(jsonByVideo);
|
|
|
}
|
|
|
+ public static Map<String, Map<String, Object>> getDicMapByVideo2(){
|
|
|
+ Object jsonByVideo = JSON.parseObject(BYTEDANCE_VIDEO_REPORT_MAPPING_JSON2);
|
|
|
+ return JsonResourceUtil.jsonToMap(jsonByVideo);
|
|
|
+ }
|
|
|
public static Map<String, Map<String, Object>> getDicMapByVideoNew(){
|
|
|
Object jsonByVideo = JSON.parseObject(BYTEDANCE_VIDEO_REPORT_MAPPING_JSON_NEW);
|
|
|
return JsonResourceUtil.jsonToMap(jsonByVideo);
|