From a5dc4aaa8582713c66872923a4f1822f6d1cfa8d Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 12 Jul 2021 14:48:31 -0400 Subject: [PATCH] group the actuals so the timestamp on the update is excluded --- build/build_rolling.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/build_rolling.sql b/build/build_rolling.sql index 6e66f7d..7136a9d 100644 --- a/build/build_rolling.sql +++ b/build/build_rolling.sql @@ -495,8 +495,8 @@ gld AS ( -----when null, greatest/least is just going to act like coalesce ,greatest(least(o.sdate,gld.edat),gld.sdat) sdate ,ss.ssyr sseas - ,o."version" - ,o.iter + ,'actuals' "version" + ,'actuals' iter FROM rlarp.osm_dev o --snap the ship dates of the historic fiscal period @@ -544,8 +544,8 @@ gld AS ( ,o.rseas ,greatest(least(o.sdate,gld.edat),gld.sdat) ,ss.ssyr - ,o."version" - ,o.iter + --,o."version" + --,o.iter ) --create a union of overlapped actuals and forecast with --forecast as negative and actuals as positive such that