KP工作台数据漏斗

来自qingwei personal wiki
Qingwei讨论 | 贡献2018年11月12日 (一) 08:17的版本 sql
跳转至: 导航搜索

描述

aone

便签

接口

external/kpwork/overview

sql

  • terminal_type: PC, TOTAL, WS
SELECT
    stat_date,
    imps_cnt_1d_027,
    clk_cnt_1d_092,
    uv_1d_169,
    fb_cnt_1d_013,
    fst_reply_rate_1m_003
FROM
    dwp_en_dm_comp_term_catelv2_eff_d
where
    stat_date>="2018-10-8"
    and stat_date<="2018-10-9"
    and statistic_type="ALL"
    and admin_mbr_seq="14"
    and terminal_type="PC"
    and is_main_cate="Y"
    and cate_lv2_id=100010695

oneService

参数

  • statDate (根据statisticsType校验,返回相应错误) 
  • terminalType
  • statisticsType
  • adminMemberSeq

SQL配置

  • external.kpwork.overview
select
    ${returnFields}    
from
    <if test='statisticsType == "day"'> 
        dwp_en_dm_comp_term_catelv2_eff_d
    </if>  
    <if test='statisticsType == "week"'> 
        dwp_en_dm_comp_term_catelv2_eff_w
    </if>
    <if test='statisticsType == "month"'> 
        dwp_en_dm_comp_term_catelv2_eff_m
    </if>         
where
    stat_date= #{statDate}
    and admin_mbr_seq= #{adminMemberSeq}
    and statistic_type= #{statisticType}
    and terminal_type= #{terminalType}
    and is_main_cate= #{isMainCate}
    and cate_lv2_id= #{cateLv2Id}