From b6edc4006a3147d82d49ac99853282a3262f2943 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 6 Nov 2020 00:00:34 -0500 Subject: [PATCH] comments --- generate_sql/col_baseline.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generate_sql/col_baseline.sql b/generate_sql/col_baseline.sql index 89b39e7..238d0a1 100644 --- a/generate_sql/col_baseline.sql +++ b/generate_sql/col_baseline.sql @@ -29,6 +29,8 @@ SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'order_date') INTO _orde SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'ship_date') INTO _ship_date; SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'order_status') INTO _order_status; +--------------------------------------clone the actual baseline----------------------------------------------- + SELECT $a$SELECT $a$::text|| @@ -53,6 +55,10 @@ INTO _ytdbody; --RAISE NOTICE '%', _ytdbody; + + +------------------------------------pull a plug from actuals to create a full year baseline------------------ + SELECT $$ ,'baseline' "version" @@ -70,6 +76,8 @@ $$ INTO _actpy; +------------------------------stack the sql into the final format------------------------------------------------ + SELECT _ytdbody ||$$UNION ALL