SELECT
DATE_TRUNC('week', block_timestamp) AS week,
COUNT(DISTINCT predecessor_id) AS "active relayers",
COUNT(DISTINCT receiver_id) AS "accounts",
COUNT(DISTINCT tx_hash) AS "transactions"
FROM
near.core.fact_actions_events
WHERE
action_name = 'Delegate'
AND receipt_succeeded = TRUE
AND block_timestamp >= '2023-03-01'
GROUP BY
1
ORDER BY
1 ASC;