PotLockDate vs New Registration
Updated 2024-06-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- forked from brian-terra / All Potlock Registers @ https://flipsidecrypto.xyz/brian-terra/q/_CbXCPpmisyW/all-potlock-registers
-- forked from All Potlock Donations @ https://flipsidecrypto.xyz/edit/queries/9297bc52-b0cc-4a3c-b2bc-dcd99993c7be
WITH txns AS (
SELECT DISTINCT
tx_hash,
transaction_fee AS tx_fee
FROM
near.core.fact_transactions b
WHERE
(tx_receiver = 'registry.potlock.near'
OR tx_signer = 'registry.potlock.near')
AND tx_succeeded = TRUE
),
qmain AS (
SELECT
block_timestamp,
b.tx_hash,
signer_id
FROM
near.core.fact_actions_events_function_call b, txns
WHERE
b.tx_hash = txns.tx_hash
AND method_name = 'register'
)
SELECT
date_trunc('day', block_timestamp) AS date,
COUNT(signer_id) AS total_new_registration
FROM
qmain
GROUP BY
1
ORDER BY
date;
QueryRunArchived: QueryRun has been archived