Explorar o código

refactor(rosn分析): 调整 dau_chg/exp_chg 字段位置

将 dau_chg 和 exp_chg 移至 dau, exp 之后,便于对比查看

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
yangxiaohui hai 1 mes
pai
achega
389a302efb

+ 4 - 3
tasks/承接/rosn分析/02_实验组xTop10一级品类_vs对照组.sql

@@ -201,7 +201,10 @@ SELECT  dt
         -- 业务指标
         ,exp_per_dau, str_one, ros_one, str, ros, str_plus, ros_minus, rovn, vovh24
         -- 计数
-        ,dau, exp, is_share, share_cnt, is_return_1, return_n_uv, viewh24, return_n_uv_noself
+        ,dau, exp
+        ,round((dau - dau_base) / NULLIF(dau_base, 0), 4) AS dau_chg
+        ,round((exp - exp_base) / NULLIF(exp_base, 0), 4) AS exp_chg
+        ,is_share, share_cnt, is_return_1, return_n_uv, viewh24, return_n_uv_noself
         -- ========== 变化率字段 ==========
         -- 业务指标变化率
         ,round((exp_per_dau - exp_per_dau_base) / NULLIF(exp_per_dau_base, 0), 4) AS exp_per_dau_chg
@@ -224,8 +227,6 @@ SELECT  dt
         ,round((rosn_real - rosn_real_base) / NULLIF(rosn_real_base, 0), 4) AS rosn_real_chg
         ,round((rovn_real - rovn_real_base) / NULLIF(rovn_real_base, 0), 4) AS rovn_real_chg
         -- 计数指标变化率
-        ,round((dau - dau_base) / NULLIF(dau_base, 0), 4) AS dau_chg
-        ,round((exp - exp_base) / NULLIF(exp_base, 0), 4) AS exp_chg
         ,round((is_share - is_share_base) / NULLIF(is_share_base, 0), 4) AS is_share_chg
         ,round((share_cnt - share_cnt_base) / NULLIF(share_cnt_base, 0), 4) AS share_cnt_chg
         ,round((is_return_1 - is_return_1_base) / NULLIF(is_return_1_base, 0), 4) AS is_return_1_chg

+ 4 - 3
tasks/承接/rosn分析/02_实验组xTop20视频_vs对照组.sql

@@ -202,7 +202,10 @@ SELECT  dt
         -- 业务指标
         ,exp_per_dau, str_one, ros_one, str, ros, str_plus, ros_minus, rovn, vovh24
         -- 计数
-        ,dau, exp, is_share, share_cnt, is_return_1, return_n_uv, viewh24, return_n_uv_noself
+        ,dau, exp
+        ,round((dau - dau_base) / NULLIF(dau_base, 0), 4) AS dau_chg
+        ,round((exp - exp_base) / NULLIF(exp_base, 0), 4) AS exp_chg
+        ,is_share, share_cnt, is_return_1, return_n_uv, viewh24, return_n_uv_noself
         -- ========== 变化率字段 ==========
         -- 业务指标变化率
         ,round((exp_per_dau - exp_per_dau_base) / NULLIF(exp_per_dau_base, 0), 4) AS exp_per_dau_chg
@@ -225,8 +228,6 @@ SELECT  dt
         ,round((rosn_real - rosn_real_base) / NULLIF(rosn_real_base, 0), 4) AS rosn_real_chg
         ,round((rovn_real - rovn_real_base) / NULLIF(rovn_real_base, 0), 4) AS rovn_real_chg
         -- 计数指标变化率
-        ,round((dau - dau_base) / NULLIF(dau_base, 0), 4) AS dau_chg
-        ,round((exp - exp_base) / NULLIF(exp_base, 0), 4) AS exp_chg
         ,round((is_share - is_share_base) / NULLIF(is_share_base, 0), 4) AS is_share_chg
         ,round((share_cnt - share_cnt_base) / NULLIF(share_cnt_base, 0), 4) AS share_cnt_chg
         ,round((is_return_1 - is_return_1_base) / NULLIF(is_return_1_base, 0), 4) AS is_return_1_chg