web | Java

基于模型输出表,统计SQL(value值为1即为命中) (1)统计日期20201010,统计指标V01(命中户数、命中率)

千锋教育

select count(*) `user_num`,sum(mingzhon) `mingzhon_num`,round(mingzhon_num / user_num,2) 


`命中率` from ( select uid,(case when get_json_object('content','$.V01') == 1 then 1 else 0 end) `mingzhon` from moxin where ds = '20201010' ) t1