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.mod_chansub
,b.quota_rep_descr ,b.quota_rep_descr
,b.director_descr ,b.director_descr
,b.value_loc ,b.fb_val_loc*s.factor*m.momix value_loc
,b.value_usd ,b.fb_val_loc*s.factor*m.momix*r_rate value_usd
,b.cost_loc ,b.fb_cst_loc*s.factor*m.momix cost_loc
,b.cost_usd ,b.fb_cst_loc*s.factor*m.momix*c_rate cost_usd
,b.units ,(b.fb_qty*s.factor*m.momix) units
FROM FROM
basemix b basemix b
CROSS JOIN scale s CROSS JOIN scale s
@ -404,4 +404,5 @@ FROM
mseq.m = m._month mseq.m = m._month
WHERE WHERE
m._month = 'Jul' m._month = 'Jul'
) )
select sum(value_usd) from final