forecast_api/build/act_to_fcst/snap_fx.sql
2020-06-09 18:35:52 -04:00

9 lines
812 B
SQL

------------update fx rates-----------------------------------------------------------------
UPDATE rlarp.osmf_dev SET r_rate = .7518 WHERE r_currency = 'CA' AND version = 'b21';
UPDATE rlarp.osmf_dev SET r_rate = 1.0000 WHERE r_currency = 'US' AND version = 'b21';
UPDATE rlarp.osmf_dev SET c_rate = .7518 WHERE c_currency = 'CA' AND version = 'b21';
UPDATE rlarp.osmf_dev SET c_rate = 1.0000 WHERE c_currency = 'US' AND version = 'b21';
UPDATE rlarp.osm_pool SET r_rate = .7518 WHERE r_currency = 'CA' AND version = 'b21';
UPDATE rlarp.osm_pool SET value_usd = value_loc * r_rate WHERE r_currency = 'CA' AND version = 'b21';
UPDATE rlarp.osm_pool SET c_rate = .7518 WHERE c_currency = 'CA' AND version = 'b21';
UPDATE rlarp.osm_pool SET cost_usd = cost_loc * c_rate WHERE c_currency = 'CA' AND version = 'b21';