{
  "cost": {
    "filed": "IFNULL(sum(t1.cost),0) as cost ",
    "comment": "消耗"
  },
  "showMaterial": {
    "filed": "IFNULL(sum(t1.material_show),0) as showMaterial ",
    "comment": "展示数"
  },
  "cpm": {
    "filed": "CASE WHEN sum(t1.cost) / sum(t1.material_show) IS NULL THEN 0 ELSE ROUND((sum(t1.cost) / sum(t1.material_show)) * 1000, 2 ) END AS cpm ",
    "comment": "平均千次展现费用"
  },
  "clickMaterial": {
    "filed": "IFNULL(sum(t1.click),0) as clickMaterial ",
    "comment": "点击数"
  },
  "ctr": {
    "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",
    "comment": "点击率"
  },
  "cpc": {
    "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 ",
    "comment": "平均点击单价"
  },
  "convertMaterial": {
    "filed": "IFNULL(sum(t1.convert_material),0) as convertMaterial ",
    "comment": "转化数"
  },
  "convertCost": {
    "filed": "CASE WHEN sum(t1.cost) / sum(t1.convert_material) IS NULL THEN 0 ELSE ROUND((sum(t1.cost) / sum(t1.convert_material)), 2 ) END AS convertCost ",
    "comment": "转化成本"
  },
  "convertRate": {
    "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 ",
    "comment": "转化率"
  },
  "downloadStart": {
    "filed": "IFNULL(sum(download_start),0) as downloadStart ",
    "comment": "安卓开始下载数"
  },
  "downloadStartCost": {
    "filed": "CASE WHEN sum(t1.cost) / (t1.download_start) IS NULL THEN 0 ELSE sum(t1.cost) / sum(t1.download_start) end AS downloadStartCost ",
    "comment": "安卓开始下载成本"
  },
  "downloadStartRate": {
    "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 ",
    "comment": "安卓开始下载率"
  },
  "downloadFinish": {
    "filed": "IFNULL(sum(t1.download_finish),0) as downloadFinish ",
    "comment": "安卓下载完成数"
  },
  "downloadFinishCost": {
    "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 ",
    "comment": "安卓下载完成成本"
  },
  "downloadFinishRate": {
    "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 ",
    "comment": "安卓下载完成率"
  },
  "active": {
    "filed": "IFNULL(sum(t1.active),0) as active ",
    "comment": "激活数"
  },
  "activeCost": {
    "filed": "CASE WHEN sum(t1.cost) / sum(t1.active) IS NULL THEN 0 ELSE sum(t1.cost) / sum(t1.active) end AS activeCost ",
    "comment": "激活成本"
  },
  "activeRate": {
    "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",
    "comment": "激活率"
  },
  "register": {
    "filed": "IFNULL(sum(t1.register),0) as register  ",
    "comment": "注册数"
  },
  "activeRegisterCost": {
    "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 ",
    "comment": "注册成本"
  },
  "activeRegisterRate": {
    "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 ",
    "comment": "注册率"
  },
  "gameAddiction": {
    "filed": "IFNULL(sum(t1.game_addiction),0) as gameAddiction  ",
    "comment": "关键行为数"
  },
  "gameAddictionCost": {
    "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 ",
    "comment": "关键行为成本"
  },
  "gameAddictionRate": {
    "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",
    "comment": "关键行为率"
  },
  "nextDayOpen": {
    "filed": "IFNULL(sum(t1.next_day_open),0) as nextDayOpen ",
    "comment": "次留数"
  },
  "nextDayOpenCost": {
    "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 ",
    "comment": "次留成本"
  },
  "nextDayOpenRate": {
    "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 ",
    "comment": "次留率"
  },
  "activePayAmount": {
    "filed": "IFNULL(sum(pay_count),0) as activePayAmount ",
    "comment": "付费数"
  },
  "activePayCost": {
    "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 ",
    "comment": "付费成本"
  },
  "form": {
    "filed": "IFNULL(sum(t1.form),0) as form ",
    "comment": "表单提交"
  },
  "validPlayCost": {
    "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 ",
    "comment": "有效播放成本"
  },
  "play25FeedBreak": {
    "filed": "IFNULL(sum(t1.play25_feed_break),0) as play25FeedBreak ",
    "comment": "25%进度播放数"
  },
  "play50FeedBreak": {
    "filed": "IFNULL(sum(t1.play50_feed_break),0) as play50FeedBreak",
    "comment": "50%进度播放数"
  },
  "play75FeedBreak": {
    "filed": "IFNULL(sum(t1.play75_feed_break),0) as play75FeedBreak",
    "comment": "75%进度播放数"
  },
  "play100FeedBreak": {
    "filed": "IFNULL(sum(t1.play100_feed_break),0) as play100FeedBreak",
    "comment": "100%进度播放数"
  },
  "follow": {
    "filed": "IFNULL(sum(t1.follow),0) as follow ",
    "comment": "新增关注数"
  },
  "likeMaterial": {
    "filed": "IFNULL(sum(t1.like_material),0) as likeMaterial ",
    "comment": "点赞数"
  },
  "shareMaterial": {
    "filed": "IFNULL(sum(t1.share_material),0) as shareMaterial ",
    "comment": "分享数"
  }
}
