| Actor | Fragment | Worker | State |
|---|---|---|---|
| 739262 | 58803 | 51 | running |
| 739263 | 58803 | 51 | running |
| 739266 | 58804 | 51 | running |
| 739267 | 58804 | 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