{
  "cost": {
    "filed": "IFNULL(sum(t1.charge),0) as cost ",
    "comment": "消耗"
  },
  "photoShow": {
    "filed": "IFNULL(sum(t1.photo_show),0) as photoShow ",
    "comment": "封面曝光数"
  },
  "photoClick": {
    "filed": "IFNULL(sum(t1.photo_click),0) as photoClick ",
    "comment": "封面点击数"
  },
  "aClick": {
    "filed": "IFNULL(sum(t1.aclick),0) as aClick ",
    "comment": "素材曝光数"
  },
  "bClick": {
    "filed": "IFNULL(sum(t1.bclick),0) as bClick ",
    "comment": "行为数"
  },
  "clickRate": {
    "filed": "CASE WHEN sum(t1.photo_click) / sum(t1.photo_show) IS NULL THEN 0 ELSE CONCAT( ROUND((sum(t1.photo_click) / sum(t1.photo_show)) * 100,2),'%') END AS clickRate ",
    "comment": "封面点击率"
  },
  "bClickRate": {
    "filed": "CASE WHEN sum(t1.bclick) / sum(t1.aclick) IS NULL THEN 0 ELSE CONCAT( ROUND((sum(t1.bclick) / sum(t1.aclick)) * 100,2),'%') END AS bClickRate ",
    "comment": "行为率"
  },
  "cpm": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.photo_show) IS NULL THEN 0 ELSE ROUND((sum(t1.charge) / sum(t1.photo_show)) * 1000, 2 ) END AS cpm ",
    "comment": "平均千次封面曝光花费"
  },
  "cpc": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.photo_click) IS NULL THEN 0 ELSE ROUND((sum(t1.charge) / sum(t1.photo_click)), 2) END AS cpc ",
    "comment": "平均封面点击单价"
  },
  "cpb": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.bclick) IS NULL THEN 0 ELSE ROUND((sum(t1.charge) / sum(t1.bclick)), 2) END AS cpb ",
    "comment": "平均行为单价"
  },
  "downloadStart": {
    "filed": "IFNULL(sum(download_started),0) as downloadStart ",
    "comment": "安卓开始下载数"
  },
  "downloadStartCost": {
    "filed": "CASE WHEN sum(t1.charge) / (t1.download_started) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.download_started) end AS downloadStartCost ",
    "comment": "安卓开始下载单价"
  },
  "downloadStartRate": {
    "filed": "CASE WHEN sum(t1.download_started) / sum(t1.bclick) IS NULL THEN 0 ELSE concat(round(sum(t1.download_started) / sum(t1.bclick)*100,2),'%') end AS downloadStartRate ",
    "comment": "安卓开始下载率"
  },
  "downloadFinish": {
    "filed": "IFNULL(sum(download_completed),0) as downloadFinish ",
    "comment": "安卓下载完成数"
  },
  "downloadFinishCost": {
    "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 ",
    "comment": "安卓下载完成单价"
  },
  "downloadFinishRate": {
    "filed": "CASE WHEN sum(t1.download_completed) / sum(t1.download_started) IS NULL THEN 0 ELSE  concat(round(sum(t1.download_completed) / sum(t1.download_started)*100,2),'%') end AS downloadFinishRate ",
    "comment": "安卓下载完成率"
  },
  "active": {
    "filed": "IFNULL(sum(activation),0) as active ",
    "comment": "激活数"
  },
  "activeCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.activation) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.activation) end AS activeCost ",
    "comment": "激活单价"
  },
  "activeRate": {
    "filed": "CASE WHEN sum(t1.activation) / sum(t1.download_completed) IS NULL THEN 0 ELSE concat(round(sum(t1.activation) / sum(t1.download_completed)*100,2),'%') end as activeRate ",
    "comment": "下载完成激活率"
  },
  "firstDayPay": {
    "filed": "IFNULL(sum(t1.event_pay_first_day),0) as firstDayPay  ",
    "comment": "首日付费次数"
  },
  "firstDayPayAmount": {
    "filed": "IFNULL(sum(t1.event_pay_purchase_amount_first_day),0) as firstDayPayAmount  ",
    "comment": "首日付费金额"
  },
  "firstDayPayCost": {
    "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 ",
    "comment": "首日付费成本"
  },
  "firstDayPayROI": {
    "filed": "CASE WHEN sum(t1.event_pay_purchase_amount_first_day) / sum(t1.charge) IS NULL THEN 0 ELSE sum(t1.event_pay_purchase_amount_first_day) / sum(t1.charge) end AS firstDayPayROI ",
    "comment": "首日ROI"
  },
  "eventPay": {
    "filed": "IFNULL(sum(t1.event_pay),0) as eventPay  ",
    "comment": "付费次数"
  },
  "eventPayPurchaseAmount": {
    "filed": "IFNULL(sum(t1.event_pay_purchase_amount),0) as eventPayPurchaseAmount  ",
    "comment": "付费金额"
  },
  "eventPayCost": {
    "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 ",
    "comment": "付费次数成本"
  },
  "ROI": {
    "filed": "CASE WHEN sum(t1.event_pay_purchase_amount) / sum(t1.charge) IS NULL THEN 0 ELSE sum(t1.event_pay_purchase_amount) / sum(t1.charge) end AS ROI ",
    "comment": "ROI"
  },
  "register": {
    "filed": "IFNULL(sum(t1.event_register),0) as register ",
    "comment": "注册数"
  },
  "activeRegisterCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.event_register) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.event_register),3) end as activeRegisterCost ",
    "comment": "注册成本"
  },
  "activeRegisterRate": {
    "filed": " CASE WHEN sum(t1.event_register) / sum(t1.activation) IS NULL THEN 0 ELSE concat(round(sum(t1.event_register) / sum(t1.activation)*100,2),'%') end as activeRegisterRate ",
    "comment": "注册率"
  },
  "eventJinJianApp": {
    "filed": "IFNULL(sum(event_jin_jian_app),0) as eventJinJianApp ",
    "comment": "完件数"
  },
  "eventJinJianAppCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.event_jin_jian_app) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.event_jin_jian_app),3) end as eventJinJianAppCost ",
    "comment": "完件成本"
  },
  "eventCreditGrantApp": {
    "filed": "IFNULL(sum(event_credit_grant_app),0) as eventCreditGrantApp ",
    "comment": "授信数"
  },
  "eventCreditGrantAppCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.event_credit_grant_app) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.event_credit_grant_app),3) end as eventCreditGrantAppCost ",
    "comment": "授信成本"
  },
  "eventCreditGrantAppRate": {
    "filed": "CASE WHEN sum(t1.event_credit_grant_app) / sum(t1.event_jin_jian_app) IS NULL THEN 0 ELSE concat(round(sum(t1.event_credit_grant_app) / sum(t1.event_jin_jian_app)*100,2),'%') end as eventCreditGrantAppRate ",
    "comment": "授信率"
  },
  "formCount": {
    "filed": "IFNULL(sum(t1.form_count),0) as formCount ",
    "comment": "表单提交数"
  },
  "formCountRate": {
    "filed": "CASE WHEN sum(t1.form_count) / sum(t1.activation) IS NULL THEN 0 ELSE concat(round(sum(t1.form_count) / sum(t1.activation)*100,2),'%') end as formCountRate ",
    "comment": "表单提交率"
  },
  "formCountCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.form_count) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.form_count),3) end as formCountCost ",
    "comment": "表单提交成本"
  },
  "nextDayOpen": {
    "filed": "IFNULL(sum(t1.event_next_day_stay),0) as nextDayOpen ",
    "comment": "次留数"
  },
  "nextDayOpenCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.event_next_day_stay) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.event_next_day_stay),3) end as nextDayOpenCost ",
    "comment": "次留成本"
  },
  "nextDayOpenRate": {
    "filed": "CASE WHEN sum(t1.event_next_day_stay) / sum(t1.activation) IS NULL THEN 0 ELSE concat(round(sum(t1.event_next_day_stay) / sum(t1.activation)*100,2),'%') end as nextDayOpenRate ",
    "comment": "次留率"
  },
  "eventJinJianLandingPage": {
    "filed": "IFNULL(sum(t1.event_jin_jian_landing_page),0) as eventJinJianLandingPage ",
    "comment": "落地页完件数"
  },
  "eventJinJianLandingPageCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.event_jin_jian_landing_page) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.event_jin_jian_landing_page),3) end as eventJinJianLandingPageCost ",
    "comment": "落地页完件成本"
  },
  "eventCreditGrantLandingPage": {
    "filed": "IFNULL(sum(t1.event_credit_grant_landing_page),0) as eventCreditGrantLandingPage ",
    "comment": "落地页授信数"
  },
  "eventCreditGrantLandingPageCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.event_credit_grant_landing_page) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.event_credit_grant_landing_page),3) end as eventCreditGrantLandingPageCost ",
    "comment": "落地页授信成本"
  },
  "eventCreditGrantLandingPageRate": {
    "filed": "CASE WHEN sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page) IS NULL THEN 0 ELSE concat(round(sum(t1.event_credit_grant_landing_page) / sum(t1.event_jin_jian_landing_page)*100,2),'%') end as eventCreditGrantLandingPageRate ",
    "comment": "落地页授信率"
  },
  "submit": {
    "filed": "IFNULL(sum(t1.submit),0) as submit ",
    "comment": "按钮点击数"
  },
  "submitCost": {
    "filed": "CASE WHEN sum(t1.charge) / sum(t1.submit) IS NULL THEN 0 ELSE round(sum(t1.charge)/sum(t1.submit),3) end as submitCost ",
    "comment": "按钮点击成本"
  },
  "submitRate": {
    "filed": "CASE WHEN sum(t1.submit) / sum(t1.bclick) IS NULL THEN 0 ELSE concat(round(sum(t1.submit) / sum(t1.bclick)*100,2),'%') end as submitRate ",
    "comment": "按钮点击率"
  },
  "play3sRate": {
    "filed": "CASE WHEN sum(CEIL(t1.play_3s_ratio*t1.photo_show)) / sum(t1.photo_show) IS NULL THEN 0 ELSE concat(round(sum(CEIL(t1.play_3s_ratio*t1.photo_show)) / sum(t1.photo_show)*100,2),'%') end as play3sRate ",
    "comment": "3s播放率"
  }
}