| Actor | Fragment | Worker | State |
|---|---|---|---|
| 157037 | 16683 | 33 | running |
| 157038 | 16683 | 33 | running |
| 157071 | 16684 | 33 | running |
| 157072 | 16684 | 33 | 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