基本思想:基于时间维度来发散数据
1.时间维度表
select month_wid,--月份
year_wid,--年份
month_ago_wid,--上期
year_ago_wid,--同期
month_start,--月份开始
month_end--月份结束
from dwd_d_month;
2.本期指标时间维表的使用
select '本期' as month_flag,
month_wid as month_wid,
month_wid as period_start,
month_wid as period_end,
year_wid as year_wid
from dwd_d_month;
3.上期指标时间维表的使用
se