| Actor | Fragment | Worker | State |
|---|---|---|---|
| 96821 | 5348 | 26 | running |
| 96822 | 5348 | 26 | running |
| 98247 | 5349 | 26 | running |
| 98248 | 5349 | 26 | running |
CREATE MATERIALIZED VIEW insights.intraday_holdings_latest_mv AS
SELECT
account_id,
asset_id,
currency_code,
purchased_quantity,
average_cost_per_unit,
market_value,
holding_timestamp
FROM (
SELECT
account_id,
asset_id,
currency_code,
purchased_quantity,
average_cost_per_unit,
market_value,
holding_timestamp,
ROW_NUMBER() OVER (PARTITION BY account_id, asset_id ORDER BY holding_timestamp DESC) AS rn
FROM olap.holding_values_intraday_ft
WHERE
disabled_at IS NULL
)
WHERE
rn = 1