| Actor | Fragment | Worker | State |
|---|---|---|---|
| 32545 | 11568 | 33 | running |
| 32546 | 11568 | 33 | running |
| 32702 | 11569 | 33 | running |
| 32703 | 11569 | 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