| Actor | Fragment | Worker | State |
|---|---|---|---|
| 156625 | 12376 | 33 | running |
| 156626 | 12376 | 33 | running |
| 156627 | 12377 | 33 | running |
| 156628 | 12377 | 33 | 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