TYPE | ADDRESSES | |
---|---|---|
1 | Kaito community | 1428 |
2 | Protocol user | 34934 |
3 | Both groups | 260 |
HessishH - c3
Updated 3 days ago
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
›
⌄
with price as (
select HOUR::date as day, avg(PRICE) as pr
from solana.price.ez_prices_hourly
where HOUR::date>= '2025-05-25'
and TOKEN_ADDRESS = 'HUMA1821qVDKta3u2ovmfDQeW2fSQouSKE8fkF44wvGw'
group by all),
claims as
(select a.BLOCK_TIMESTAMP,TX_TO,AMOUNT,
AMOUNT*pr as usd, a.TX_ID ,PROGRAM_ID,
case when PROGRAM_ID = 'CwjcZKhYZ69bEL7jkotHtmAqhNBNmxyZCLUdVwsK3fWV'
then 'Kaito community' else 'Protocol users' end as claim_type
from solana.core.fact_transfers a
join solana.core.fact_events b
on a.tx_id = b.tx_id
join price on a.BLOCK_TIMESTAMP::date = day
where b.BLOCK_TIMESTAMP::date >= '2025-05-25'
and PROGRAM_ID in ('Distcc8stwHiwnxxj5BWkP9Re7MWRhH3JqRaRxfQC6Zr','CwjcZKhYZ69bEL7jkotHtmAqhNBNmxyZCLUdVwsK3fWV')
and mint = 'HUMA1821qVDKta3u2ovmfDQeW2fSQouSKE8fkF44wvGw'and
a.tx_id in (select distinct tx_id as hash
FROM
solana.core.fact_transactions,
LATERAL FLATTEN(input => LOG_MESSAGES)
WHERE BLOCK_TIMESTAMP::date >= '2025-05-25'
AND VALUE iLIKE '%claim%')
),
users as
(select distinct TX_TO,
CASE
WHEN COUNT(DISTINCT claim_type) = 2 THEN 'Both groups'
WHEN MAX(claim_type) = 'Kaito community' THEN 'Kaito community'
WHEN MAX(claim_type) = 'Protocol users' THEN 'Protocol user'
END AS type
from claims
group by all)
Last run: 3 days ago
3
70B
191s