| Actor | Fragment | Worker | State |
|---|---|---|---|
| 736616 | 51765 | 51 | running |
| 736617 | 51765 | 51 | running |
| 736618 | 51766 | 51 | running |
| 736619 | 51766 | 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
WHERE
disabled_at IS NULL
) AS deduped
WHERE
rn = 1