hessHolders Vs. Non-Holders
Updated 2023-06-09
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 swap_to as ( select block_timestamp, origin_from_address, tx_hash, case when token_out = '0x68327a91e79f87f501bc8522fc333fb7a72393cb' then 'Aux Users'
else 'AGX Users' end as label
from avalanche.core.ez_dex_swaps
where token_out in ('0x68327a91e79f87f501bc8522fc333fb7a72393cb','0x13e7bcefdde72492e656f3fa58bae6029708e673'))
,
final as ( select block_timestamp, tx_hash, origin_from_address, to_address as platform, amount_usd
from avalanche.core.ez_token_transfers
where block_timestamp::date >= current_date - 180
and origin_from_address in (select DISTINCT origin_from_address from swap_to)
and contract_address in ('0x68327a91e79f87f501bc8522fc333fb7a72393cb','0x13e7bcefdde72492e656f3fa58bae6029708e673'))
,
final_2 as ( select DISTINCT a.origin_from_address
from final a join swap_to b on a.origin_from_address = b.origin_from_address
where a.block_timestamp > b.block_timestamp)
select 'Had Transactions' as type, count(DISTINCT(origin_from_address)) as users
from swap_to
where origin_from_address in (select origin_from_address from final_2)
group by 1
UNION
select 'Hold' as type, count(DISTINCT(origin_from_address)) as users
from swap_to
where origin_from_address not in (select origin_from_address from final_2)
group by 1
Run a query to Download Data