populate renamed value columns

This commit is contained in:
Paul Trowbridge 2019-03-05 10:52:35 -05:00
parent 9d20bee6d1
commit 76df50c85d

View File

@ -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
@ -405,3 +405,4 @@ FROM
WHERE
m._month = 'Jul'
)
select sum(value_usd) from final