From 6d2cacb72614da99a01b78470701f2a533658884 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 27 Oct 2020 23:12:10 -0400 Subject: [PATCH] change the baseline version names --- readme.md | 2 +- sql/baseline.sql | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index da21769..963a7c7 100644 --- a/readme.md +++ b/readme.md @@ -5,7 +5,7 @@ setup the basic assumption is a single sales table is available to work with that has a lot of related data that came from master data tables originally. the goal then is to break that back apart to whatever degree is necessary. -* _**run**_ schema.sql and perd.sql to setup basic tables +* _**run**_ `schema.sql` and `perd.sql` to setup basic tables * create a table fc.live as copied from target * _**run**_ `target_info.sql` to populate the `fc.target_meta` table that holds all the columns and their roles * fill in flags on table `fc.target_meta` to show how the data is related diff --git a/sql/baseline.sql b/sql/baseline.sql index 2aa3458..a2ac81c 100644 --- a/sql/baseline.sql +++ b/sql/baseline.sql @@ -2,7 +2,7 @@ WITH baseline AS ( -----------------------copy YTD sales--------------------------------------------------------------------- SELECT - ,'15mo' "version" + ,'baseline' "version" ,'actuals' iter FROM rlarp.osm_dev o @@ -27,8 +27,8 @@ baseline AS ( UNION ALL ---------option 1: fill in the rest of the year, with the prior years sales-sales---------------------------- SELECT - ,'actuals' "version" - ,'actuals_plug' iter + ,'baseline' "version" + ,'plug' iter FROM rlarp.osm_dev o LEFT OUTER JOIN gld ON @@ -44,8 +44,8 @@ baseline AS ( UNION ALL --------option 2: fill in the remainder of the current year with current forecase----------------------------- SELECT - ,'actuals' "version" - ,'forecast_plug' iter + ,'baseline' "version" + ,'plug' iter FROM rlarp.osmp_dev o LEFT OUTER JOIN gld ON @@ -69,7 +69,7 @@ SELECT ,o.rseas + 1 --incremented ,o.sdate + interval '1 year' --incremented ,o.sseas + 1 --incremented - ,'b21' "version" + ,'baseline' "version" ,'copy' iter FROM baseline o