| Actor | Fragment | Worker | State |
|---|---|---|---|
| 744009 | 62694 | 51 | running |
| 744010 | 62694 | 51 | running |
| 744215 | 62693 | 51 | running |
| 744216 | 62693 | 51 | running |
CREATE MATERIALIZED VIEW search.party_active_relationships_mv AS
SELECT
party_id,
type,
status
FROM (
SELECT
party_id,
type,
status,
ROW_NUMBER() OVER (
PARTITION BY party_id, type
ORDER BY updated_at DESC, status_changed_at DESC, effective_from DESC, id DESC
) AS rn
FROM party.customer_relationships AS customer_relationships_next
WHERE
disabled_at IS NULL
) AS deduped
WHERE
rn = 1