关于最后一题的第10个填空,我认为不能只有一个空,所以在这个空里我填了10-1,10-2,10-3
我的疑惑是,怎么算一个一个子查询计算完毕,我最后观察,觉得当该查询出现select部分的时候,就算查询完毕了
所以根据这点,我在第三个里填写了三个部分。但是为什么题目只有一个空???
— 拆解步骤如下,请将下列横线处拆解内容补充完整
— 以下题4个空,每空10分
1.from kps_dwd.kps_dwd_dd_view_user_active
2.where dt=’${dt_1}’
3.select
dt,product_id,st_time,device_id
4.from
(……) a0
5.left join
(selectdt,mkey,device_idfrom kps_dwd.kps_dwd_dd_user_channelswhere dt='${dt_1}') a1on a0.device_id = a1.device_id
6.__
7.select
dt,product_id,mkey,hour,device_id,'active' as statusfrom temp_active_hour_table_kpsgroup by dt,mkey,product_id,device_id,hour
8.__
9.from
(……) a
10.__
11.from
(selectdt,'K-pop' as product,product_id,mkey,hour,status,count(distinct a.device_id) as dau,count(distinct if(b.device_id is not null,a.device_id,null)) as new……group by dt,product_id,mkey,hour,status) a1
12.__
13.select
dt,product,product_id,a1.mkey,name_cn,hour,status,dau,new
