From b9a2d9d8fc9c0a7b77767190a4c765ee1306bc3f Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 8 Dec 2020 01:13:31 -0500 Subject: [PATCH] add version and inter, SQL works fine --- routes/scale/gen_scale.sql | 14 +++++++++++++- routes/scale/scale.sql | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/routes/scale/gen_scale.sql b/routes/scale/gen_scale.sql index ade8420..77e331d 100644 --- a/routes/scale/gen_scale.sql +++ b/routes/scale/gen_scale.sql @@ -114,6 +114,8 @@ vscale AS ( ,volume AS ( SELECT $$||_clist_vol||$$ + ,'forecast name' AS version + ,'scale vol' AS iter FROM basemix o CROSS JOIN vscale @@ -145,6 +147,8 @@ FROM ,pricing AS ( SELECT $$||_clist_prc||$$ + ,'forecast name' AS version + ,'scale price' AS iter FROM volume o CROSS JOIN pscale @@ -153,7 +157,15 @@ WHERE ) INSERT INTO fc.live -SELECT * FROM volume UNION ALL SELECT * FROM pricing +SELECT + * +FROM + volume +UNION ALL +SELECT + * +FROM + pricing $$ INTO _sql; diff --git a/routes/scale/scale.sql b/routes/scale/scale.sql index dccc721..edfed1b 100644 --- a/routes/scale/scale.sql +++ b/routes/scale/scale.sql @@ -236,6 +236,8 @@ SELECT ,o.rseas ,o.sdate ,o.sseas + ,'forecast name' AS version + ,'scale vol' AS iter FROM basemix o CROSS JOIN vscale @@ -367,6 +369,8 @@ SELECT ,o.rseas ,o.sdate ,o.sseas + ,'forecast name' AS version + ,'scale price' AS iter FROM volume o CROSS JOIN pscale @@ -375,5 +379,13 @@ WHERE ) INSERT INTO fc.live -SELECT * FROM volume UNION ALL SELECT * FROM pricing +SELECT + * +FROM + volume +UNION ALL +SELECT + * +FROM + pricing