| Actor | Fragment | Worker | State |
|---|---|---|---|
| 742937 | 62514 | 51 | running |
| 742938 | 62514 | 51 | running |
| 742959 | 62515 | 51 | running |
| 742960 | 62515 | 51 | running |
CREATE MATERIALIZED VIEW insights.fx_rates_snapshot_mv AS
SELECT
source_currency_code,
target_currency_code,
rate,
CAST(date AS TIMESTAMPTZ) AS value_timestamp
FROM (
SELECT
source_currency_code,
target_currency_code,
rate,
date,
ROW_NUMBER() OVER (PARTITION BY source_currency_code, target_currency_code ORDER BY date DESC) AS rn
FROM asset_service.foreign_exchange_rates_eod_ft
WHERE
source_currency_code <> target_currency_code
)
WHERE
rn = 1