MLDZMNhl2
Updated 2023-05-31
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
›
⌄
with tb1 as (SELECT
To_ADDRESS,
sum(RAW_AMOUNT/1e6) as volume_receive
from avalanche.core.fact_token_transfers
where CONTRACT_ADDRESS = lower ('0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD')
and BLOCK_TIMESTAMP>='2023-05-25'
group by 1),
tb2 as (SELECT
From_ADDRESS,
sum(RAW_AMOUNT/1e6) as volume_sent
from avalanche.core.fact_token_transfers
where CONTRACT_ADDRESS = lower ('0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD')
and BLOCK_TIMESTAMP>='2023-05-25'
group by 1)
select
tb1.to_address as user,
ifnull(volume_receive,0) - ifnull(volume_sent,0) as volume_hold
from tb1
left outer join tb2 on tb1.to_address=tb2.From_ADDRESS
where volume_receive>volume_sent
and tb1.to_address <>'0x0000000000000000000000000000000000000000'
order by 2 desc
Run a query to Download Data