From 76df50c85d7435cf4b28e14674bc0fec04802521 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 5 Mar 2019 10:52:35 -0500 Subject: [PATCH] populate renamed value columns --- route_meta/scenario_replace_month.sql | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/route_meta/scenario_replace_month.sql b/route_meta/scenario_replace_month.sql index b982e0a..b9e0952 100644 --- a/route_meta/scenario_replace_month.sql +++ b/route_meta/scenario_replace_month.sql @@ -391,11 +391,11 @@ SELECT ,b.mod_chansub ,b.quota_rep_descr ,b.director_descr - ,b.value_loc - ,b.value_usd - ,b.cost_loc - ,b.cost_usd - ,b.units + ,b.fb_val_loc*s.factor*m.momix value_loc + ,b.fb_val_loc*s.factor*m.momix*r_rate value_usd + ,b.fb_cst_loc*s.factor*m.momix cost_loc + ,b.fb_cst_loc*s.factor*m.momix*c_rate cost_usd + ,(b.fb_qty*s.factor*m.momix) units FROM basemix b CROSS JOIN scale s @@ -404,4 +404,5 @@ FROM mseq.m = m._month WHERE m._month = 'Jul' -) \ No newline at end of file +) +select sum(value_usd) from final \ No newline at end of file