gigiokobaPOPCAT Weekly Holders copy
Updated 2024-07-28
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 Ario / POPCAT Weekly Holders @ https://flipsidecrypto.xyz/Ario/q/5Y0dMTKpWhde/popcat-weekly-holders
WITH change AS (
select
DATE_TRUNC('week', BLOCK_TIMESTAMP) AS Week,
ACCOUNT_ADDRESS as user_address,
sum(BALANCE - PRE_BALANCE) as balance_Change
from solana.core.fact_token_balances
where MINT = 'HnKkzR1YtFbUUxM6g3iVRS2RY68KHhGV7bNdfF1GCsJB'
group by 1,2
/*
SELECT
DATE_TRUNC('week', BLOCK_TIMESTAMP) AS Week,
TX_TO as user_address,
SUM(amount) AS balance_Change
FROM
solana.core.fact_transfersUpdateUpdate
where
MINT = 'HnKkzR1YtFbUUxM6g3iVRS2RY68KHhGV7bNdfF1GCsJB'
--and block_timestamp >= '2023-12-01'
GROUP BY
Week,
user_address
union
all
SELECT
DATE_TRUNC('week', BLOCK_TIMESTAMP) AS Week,
tx_from as user_address,
SUM(- amount) AS balance_Change
FROM
solana.core.fact_transfersUpdate
where
MINT = 'HnKkzR1YtFbUUxM6g3iVRS2RY68KHhGV7bNdfF1GCsJB'
--and block_timestamp >= '2023-12-01'
GROUP BY
Week,
QueryRunArchived: QueryRun has been archived