|
@@ -6,43 +6,66 @@
|
|
|
<!-- 查询快手组 时报 消耗前10 -->
|
|
|
<select id="getKuaishouUnitReportHourly" resultType="org.jeecg.ctop.material.entity.KuaishouUnitReportHourlyPojo">
|
|
|
SELECT
|
|
|
- unit_id AS unitId,
|
|
|
- unit_name as unitName,
|
|
|
+ unit_id,
|
|
|
+ unit_name,
|
|
|
sum( aclick ) AS aClick,
|
|
|
sum( bclick ) AS bClick,
|
|
|
sum( charge ) AS cost,
|
|
|
sum( `show` ) AS photoShow,
|
|
|
- sum( photo_click_ratio ) AS clickRate,
|
|
|
- sum( action_ratio ) AS bClickRate,
|
|
|
- sum( impression_1k_cost ) AS cpm,
|
|
|
- sum( photo_click_cost ) AS cpc,
|
|
|
- sum( action_cost ) AS cpb,
|
|
|
+ sum( photo_click ) AS photoClick ,
|
|
|
+ CONCAT( ROUND( sum( photo_click ) / sum( `show` ) * 100, 2 ), '%' ) AS clickRate,
|
|
|
+ CONCAT( ROUND( sum( bclick ) / sum( aclick ) * 100, 2 ), '%' ) AS bClickRate,
|
|
|
+ ROUND( sum( charge ) / sum( `show` ) * 1000, 2 ) AS cpm,
|
|
|
+ ROUND( sum( charge ) / sum( photo_click ) * 1000, 2 ) AS cpc,
|
|
|
+ ROUND( sum( charge ) / sum( bclick ) * 1000, 2 ) AS cpb,
|
|
|
sum( download_started ) AS downloadStart,
|
|
|
+ CONCAT( ROUND( sum( download_started ) / sum( bclick ) * 100, 2 ), '%' ) AS downloadStartRate,
|
|
|
+ ROUND( sum( charge ) / sum( download_started ) * 100, 2 ) AS downloadStartCost,
|
|
|
+
|
|
|
+ ROUND( sum( event_pay_first_day ) / sum( activation ) * 100, 2 ) AS eventNewUserPayRatio,
|
|
|
sum( download_completed ) AS downloadFinish,
|
|
|
+ CONCAT( ROUND( sum( download_completed ) / sum( download_started ) * 100, 2 ), '%' ) AS downloadFinishRate,
|
|
|
+
|
|
|
+ ROUND( sum( charge ) / sum( download_completed ) * 100, 2 ) AS downloadFinishCost,
|
|
|
sum( activation ) AS active,
|
|
|
+ ROUND( sum( charge ) / sum( activation ) * 100, 2 ) AS activeCost,
|
|
|
+ CONCAT( ROUND( sum( activation ) / sum( download_completed ) * 100, 2 ), '%' ) AS activeRate,
|
|
|
sum( event_pay_first_day ) AS firstDayPay,
|
|
|
sum( event_pay_purchase_amount_first_day ) AS firstDayPayAmount,
|
|
|
- sum( event_pay_first_day_roi ) AS firstDayPayROI,
|
|
|
- sum( event_pay_roi ) AS ROI,
|
|
|
+ ROUND( sum( charge ) / sum( event_pay_first_day ) * 100, 2 ) AS firstDayPayCost,
|
|
|
+ ROUND( sum( event_pay_purchase_amount_first_day ) / sum( charge ) * 100, 2 ) AS firstDayPayROI,
|
|
|
+ sum( event_pay ) AS eventPay,
|
|
|
+ sum( event_pay_purchase_amount ) AS eventPayPurchaseAmount,
|
|
|
+ ROUND( sum( charge ) / sum( event_pay ) * 100, 2 ) AS eventPayCost,
|
|
|
+ ROUND( sum( event_pay_purchase_amount ) / sum( charge ) * 100, 2 ) AS ROI,
|
|
|
sum( event_register ) AS register,
|
|
|
- sum( event_register_cost ) AS activeRegisterCost,
|
|
|
- sum( event_register_ratio ) AS activeRegisterRate,
|
|
|
+ ROUND( sum( charge ) / sum( event_register ) * 100, 2 ) AS activeRegisterCost,
|
|
|
+ CONCAT( ROUND( sum( event_register ) / sum( activation ) * 100, 2 ), '%' ) AS activeRegisterRate,
|
|
|
sum( event_next_day_stay ) AS nextDayOpen,
|
|
|
- sum( event_next_day_stay_cost ) AS nextDayOpenCost,
|
|
|
- sum( event_next_day_stay_ratio ) AS nextDayOpenRate,
|
|
|
- sum( event_credit_grant_landing_page_ratio ) AS eventCreditGrantLandingPageRate,
|
|
|
- sum( play_3s_ratio ) AS play3sRate,
|
|
|
- sum( form_cost ) AS formCountCost,
|
|
|
- sum( form_action_ratio ) AS formCountRate,
|
|
|
- sum( event_button_click_cost ) AS submitCost,
|
|
|
- sum( event_button_click_ratio ) AS submitRate,
|
|
|
- CONCAT( ROUND( sum( download_started ) / sum( bclick ) * 100, 2 ), '%' ) AS downloadStartRate,
|
|
|
- ROUND( sum(download_started) / sum(bclick) * 100, 2 ) AS downloadStartCost,
|
|
|
- CONCAT( ROUND( sum( download_completed ) / sum( download_started ) * 100, 2 ), '%' ) AS downloadFinishRate,
|
|
|
- ROUND( sum( charge ) / sum( download_completed ) * 100, 2 ) AS downloadFinishCost,
|
|
|
- ROUND( sum( charge ) / sum( activation ) * 100, 2 ) AS activeCost,
|
|
|
- CONCAT( ROUND( sum( activation ) / sum( download_completed ) * 100, 2 ), '%' ) AS activeRate,
|
|
|
- ROUND( sum( charge ) / sum( event_pay_first_day ) * 100, 2 ) AS firstDayPayCost
|
|
|
+ ROUND( sum( charge ) / sum( event_next_day_stay ) * 100, 2 ) AS nextDayOpenCost,
|
|
|
+ ROUND( sum( charge ) / sum( form_count ) * 100, 2 ) AS nextDayOpenRate,
|
|
|
+ sum( event_jin_jian_app ) AS eventJinJianApp,
|
|
|
+ ROUND( sum( charge ) / sum( event_jin_jian_app ) * 100, 2 ) AS eventJinJianAppCost,
|
|
|
+ sum( event_credit_grant_app ) AS eventCreditGrantApp,
|
|
|
+ ROUND( sum( charge ) / sum( event_credit_grant_app ) * 100, 2 ) AS eventCreditGrantAppCost,
|
|
|
+ CONCAT( ROUND( sum( event_credit_grant_app ) / sum( event_jin_jian_app ) * 100, 2 ), '%' ) AS eventCreditGrantAppRate,
|
|
|
+ ROUND( sum( charge ) / sum( aclick ) * 100, 2 ) AS play3sRate,
|
|
|
+ sum( key_action ) AS keyAction,
|
|
|
+ ROUND( sum( charge ) / sum( aclick ) * 100, 2 ) AS keyActionCost,
|
|
|
+ sum( event_app_invoked ) AS eventAppInvoked,
|
|
|
+ ROUND( sum( charge ) / sum( bclick ) * 100, 2 ) AS eventAppInvokedCost,
|
|
|
+ CONCAT( ROUND( sum( event_app_invoked ) / sum( bclick ) * 100, 2 ), '%' ) AS eventAppInvokedRatio,
|
|
|
+ sum( form_count ) AS formCount,
|
|
|
+ CONCAT( ROUND( sum( form_cost ) / sum( bclick ) * 100, 2 ), '%' ) AS formCountRate,
|
|
|
+ ROUND( sum( charge ) / sum( event_jin_jian_app ) * 100, 2 ) AS formCountCost,
|
|
|
+ sum( event_jin_jian_landing_page ) AS eventJinJianLandingPage,
|
|
|
+ ROUND( sum( charge ) / sum( event_jin_jian_landing_page ) * 100, 2 ) AS eventJinJianLandingPageCost,
|
|
|
+ sum( event_credit_grant_landing_page ) AS eventCreditGrantLandingPage,
|
|
|
+ ROUND( sum( charge ) / sum( event_credit_grant_landing_page_ratio ) * 100, 2 ) AS eventCreditGrantLandingPageCost,
|
|
|
+ CONCAT( ROUND( sum( event_credit_grant_landing_page ) / sum( event_jin_jian_landing_page ) * 100, 2 ), '%' ) AS eventCreditGrantLandingPageRate,
|
|
|
+ sum( event_button_click ) AS submit,
|
|
|
+ ROUND( sum( charge ) / sum( event_button_click ) * 100, 2 ) AS submitCost,
|
|
|
+ CONCAT( ROUND( sum( event_button_click ) / sum( bclick ) * 100, 2 ), '%' ) AS submitRate
|
|
|
FROM
|
|
|
application.kuaishou_unit_report_hourly_dw
|
|
|
WHERE
|
|
@@ -59,43 +82,66 @@
|
|
|
<!-- 查询快手组 日报 消耗前10 -->
|
|
|
<select id="getKuaishouUnitReportDaily" resultType="org.jeecg.ctop.material.entity.KuaishouUnitReportHourlyPojo">
|
|
|
SELECT
|
|
|
- unit_id AS unitId,
|
|
|
- unit_name as unitName,
|
|
|
+ unit_id,
|
|
|
+ unit_name,
|
|
|
sum( aclick ) AS aClick,
|
|
|
sum( bclick ) AS bClick,
|
|
|
sum( charge ) AS cost,
|
|
|
sum( `show` ) AS photoShow,
|
|
|
- sum( photo_click_ratio ) AS clickRate,
|
|
|
- sum( action_ratio ) AS bClickRate,
|
|
|
- sum( impression_1k_cost ) AS cpm,
|
|
|
- sum( photo_click_cost ) AS cpc,
|
|
|
- sum( action_cost ) AS cpb,
|
|
|
+ sum( photo_click ) AS photoClick ,
|
|
|
+ CONCAT( ROUND( sum( photo_click ) / sum( `show` ) * 100, 2 ), '%' ) AS clickRate,
|
|
|
+ CONCAT( ROUND( sum( bclick ) / sum( aclick ) * 100, 2 ), '%' ) AS bClickRate,
|
|
|
+ ROUND( sum( charge ) / sum( `show` ) * 1000, 2 ) AS cpm,
|
|
|
+ ROUND( sum( charge ) / sum( photo_click ) * 1000, 2 ) AS cpc,
|
|
|
+ ROUND( sum( charge ) / sum( bclick ) * 1000, 2 ) AS cpb,
|
|
|
sum( download_started ) AS downloadStart,
|
|
|
+ CONCAT( ROUND( sum( download_started ) / sum( bclick ) * 100, 2 ), '%' ) AS downloadStartRate,
|
|
|
+ ROUND( sum( charge ) / sum( download_started ) * 100, 2 ) AS downloadStartCost,
|
|
|
+
|
|
|
+ ROUND( sum( event_pay_first_day ) / sum( activation ) * 100, 2 ) AS eventNewUserPayRatio,
|
|
|
sum( download_completed ) AS downloadFinish,
|
|
|
+ CONCAT( ROUND( sum( download_completed ) / sum( download_started ) * 100, 2 ), '%' ) AS downloadFinishRate,
|
|
|
+
|
|
|
+ ROUND( sum( charge ) / sum( download_completed ) * 100, 2 ) AS downloadFinishCost,
|
|
|
sum( activation ) AS active,
|
|
|
+ ROUND( sum( charge ) / sum( activation ) * 100, 2 ) AS activeCost,
|
|
|
+ CONCAT( ROUND( sum( activation ) / sum( download_completed ) * 100, 2 ), '%' ) AS activeRate,
|
|
|
sum( event_pay_first_day ) AS firstDayPay,
|
|
|
sum( event_pay_purchase_amount_first_day ) AS firstDayPayAmount,
|
|
|
- sum( event_pay_first_day_roi ) AS firstDayPayROI,
|
|
|
- sum( event_pay_roi ) AS ROI,
|
|
|
+ ROUND( sum( charge ) / sum( event_pay_first_day ) * 100, 2 ) AS firstDayPayCost,
|
|
|
+ ROUND( sum( event_pay_purchase_amount_first_day ) / sum( charge ) * 100, 2 ) AS firstDayPayROI,
|
|
|
+ sum( event_pay ) AS eventPay,
|
|
|
+ sum( event_pay_purchase_amount ) AS eventPayPurchaseAmount,
|
|
|
+ ROUND( sum( charge ) / sum( event_pay ) * 100, 2 ) AS eventPayCost,
|
|
|
+ ROUND( sum( event_pay_purchase_amount ) / sum( charge ) * 100, 2 ) AS ROI,
|
|
|
sum( event_register ) AS register,
|
|
|
- sum( event_register_cost ) AS activeRegisterCost,
|
|
|
- sum( event_register_ratio ) AS activeRegisterRate,
|
|
|
+ ROUND( sum( charge ) / sum( event_register ) * 100, 2 ) AS activeRegisterCost,
|
|
|
+ CONCAT( ROUND( sum( event_register ) / sum( activation ) * 100, 2 ), '%' ) AS activeRegisterRate,
|
|
|
sum( event_next_day_stay ) AS nextDayOpen,
|
|
|
- sum( event_next_day_stay_cost ) AS nextDayOpenCost,
|
|
|
- sum( event_next_day_stay_ratio ) AS nextDayOpenRate,
|
|
|
- sum( event_credit_grant_landing_page_ratio ) AS eventCreditGrantLandingPageRate,
|
|
|
- sum( play_3s_ratio ) AS play3sRate,
|
|
|
- sum( form_cost ) AS formCountCost,
|
|
|
- sum( form_action_ratio ) AS formCountRate,
|
|
|
- sum( event_button_click_cost ) AS submitCost,
|
|
|
- sum( event_button_click_ratio ) AS submitRate,
|
|
|
- CONCAT( ROUND( sum( download_started ) / sum( bclick ) * 100, 2 ), '%' ) AS downloadStartRate,
|
|
|
- ROUND( sum(download_started) / sum(bclick) * 100, 2 ) AS downloadStartCost,
|
|
|
- CONCAT( ROUND( sum( download_completed ) / sum( download_started ) * 100, 2 ), '%' ) AS downloadFinishRate,
|
|
|
- ROUND( sum( charge ) / sum( download_completed ) * 100, 2 ) AS downloadFinishCost,
|
|
|
- ROUND( sum( charge ) / sum( activation ) * 100, 2 ) AS activeCost,
|
|
|
- CONCAT( ROUND( sum( activation ) / sum( download_completed ) * 100, 2 ), '%' ) AS activeRate,
|
|
|
- ROUND( sum( charge ) / sum( event_pay_first_day ) * 100, 2 ) AS firstDayPayCost
|
|
|
+ ROUND( sum( charge ) / sum( event_next_day_stay ) * 100, 2 ) AS nextDayOpenCost,
|
|
|
+ ROUND( sum( charge ) / sum( form_count ) * 100, 2 ) AS nextDayOpenRate,
|
|
|
+ sum( event_jin_jian_app ) AS eventJinJianApp,
|
|
|
+ ROUND( sum( charge ) / sum( event_jin_jian_app ) * 100, 2 ) AS eventJinJianAppCost,
|
|
|
+ sum( event_credit_grant_app ) AS eventCreditGrantApp,
|
|
|
+ ROUND( sum( charge ) / sum( event_credit_grant_app ) * 100, 2 ) AS eventCreditGrantAppCost,
|
|
|
+ CONCAT( ROUND( sum( event_credit_grant_app ) / sum( event_jin_jian_app ) * 100, 2 ), '%' ) AS eventCreditGrantAppRate,
|
|
|
+ ROUND( sum( charge ) / sum( aclick ) * 100, 2 ) AS play3sRate,
|
|
|
+ sum( key_action ) AS keyAction,
|
|
|
+ ROUND( sum( charge ) / sum( aclick ) * 100, 2 ) AS keyActionCost,
|
|
|
+ sum( event_app_invoked ) AS eventAppInvoked,
|
|
|
+ ROUND( sum( charge ) / sum( bclick ) * 100, 2 ) AS eventAppInvokedCost,
|
|
|
+ CONCAT( ROUND( sum( event_app_invoked ) / sum( bclick ) * 100, 2 ), '%' ) AS eventAppInvokedRatio,
|
|
|
+ sum( form_count ) AS formCount,
|
|
|
+ CONCAT( ROUND( sum( form_cost ) / sum( bclick ) * 100, 2 ), '%' ) AS formCountRate,
|
|
|
+ ROUND( sum( charge ) / sum( event_jin_jian_app ) * 100, 2 ) AS formCountCost,
|
|
|
+ sum( event_jin_jian_landing_page ) AS eventJinJianLandingPage,
|
|
|
+ ROUND( sum( charge ) / sum( event_jin_jian_landing_page ) * 100, 2 ) AS eventJinJianLandingPageCost,
|
|
|
+ sum( event_credit_grant_landing_page ) AS eventCreditGrantLandingPage,
|
|
|
+ ROUND( sum( charge ) / sum( event_credit_grant_landing_page_ratio ) * 100, 2 ) AS eventCreditGrantLandingPageCost,
|
|
|
+ CONCAT( ROUND( sum( event_credit_grant_landing_page ) / sum( event_jin_jian_landing_page ) * 100, 2 ), '%' ) AS eventCreditGrantLandingPageRate,
|
|
|
+ sum( event_button_click ) AS submit,
|
|
|
+ ROUND( sum( charge ) / sum( event_button_click ) * 100, 2 ) AS submitCost,
|
|
|
+ CONCAT( ROUND( sum( event_button_click ) / sum( bclick ) * 100, 2 ), '%' ) AS submitRate
|
|
|
FROM
|
|
|
application.kuaishou_unit_report_daily_dw
|
|
|
WHERE
|