drop table dm_project.user_action_detail_lylc
create table dm_project.user_action_detail_lylc as
select
a.teacher_id
,a.teacher_name
,a.teacher_subject
,a.teacher_stage
,a.school_name
,b.action
,b.resourceType
,b.activitylink_type
,b.watchDuration
,b.action_date
,case when a.dt_tenant='t_gxklm' then '高中'
else '小学' end as dt_tenant
,case when b.action_date between '20190901' and '20190930' then '201909'
when b.action_date between '20191001' and '20191031' then '201910'
when b.action_date>='20191101' then '201911'
else '其他' end as action_month
from
(select teacher_id,teacher_name,teacher_stage,teacher_subject,school_name,dt_tenant
from tmp.activity_teacher_lylc_user_info
--where school_name!='尚睿通总校'
) a
left join
一个未解决的hive语句问题
最新推荐文章于 2023-04-30 16:51:46 发布