| Actor | Fragment | Worker | State |
|---|---|---|---|
| 54064 | 2442 | 3 | running |
| 54065 | 2442 | 3 | running |
| 54066 | 2443 | 3 | running |
| 54067 | 2443 | 3 | 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