1111

Posted on 2020-11-25 12:02  sylar少侠  阅读(83)  评论(0)    收藏  举报
select is_default ,high_quantity, count(*), sum(click) , sum(click)/count(*) 
        ,sum(pay) , sum(pay)/count(*)
from (
    select queryseg_norm_d,item_id,queryseg_norm,if(s_tag in ('1','3','5','7'),'Y','N') is_default
            ,S_th , if(label=1,1,0) click, if(label=4000,1,0) pay 
            ,if(coalesce(S_th,0)>=10000,1,0) high_quantity
    from search_offline.s_c2m_offline_stacking_aop_sample_orc 
    where ds=max_pt('search_offline.s_c2m_offline_stacking_aop_sample_orc')
) ta 
group by is_default ,high_quantity
;

 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3