MetaLightTop 50 $TOKE Holders
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
›
⌄
-- forked from SocioCrypto / Top 50 $BONK Holders @ https://flipsidecrypto.xyz/SocioCrypto/q/3zZo0CVyjqA0/top-50-bonk-holders
WITH received as (
SELECT
tx_to as wallet,
sum(amount) as amnt
FROM solana.core.fact_transfers
WHERE mint = 'AmgUMQeqW8H74trc8UkKjzZWtxBdpS496wh4GLy2mCpo'
AND block_timestamp::date >= '2022-12-01'
GROUP by wallet
),
sent as (
SELECT
tx_from as wallet,
sum(amount) as amnt
FROM solana.core.fact_transfers
WHERE mint = 'AmgUMQeqW8H74trc8UkKjzZWtxBdpS496wh4GLy2mCpo'
AND block_timestamp >= '2022-12-01'
GROUP by wallet
)
SELECT top 50 s.wallet, r.wallet, l.address_name, l.label,l.label_subtype,l.label_type,
zeroifnull(r.amnt)-zeroifnull(s.amnt) as balance,
rank()over(order by balance DESC) as rank
FROM sent s
FULL JOIN received r
ON r.wallet = s.wallet
LEFT JOIN solana.core.dim_labels l
ON s.wallet = l.address
ORDER BY balance DESC
Run a query to Download Data