pine_samiTop TRIAS holders on BSC chain
Updated 2022-11-18Copy Reference Fork
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 outflow as (
select FROM_ADDRESS as sender, sum(RAW_AMOUNT/1e18) as outt
from bsc.core.fact_token_transfers
where CONTRACT_ADDRESS='0xa4838122c683f732289805fc3c207febd55babdd' and RAW_AMOUNT>0
group by 1
),
inflow as (
select TO_ADDRESS as receiver , sum(RAW_AMOUNT/1e18) as intt
from bsc.core.fact_token_transfers
where CONTRACT_ADDRESS='0xa4838122c683f732289805fc3c207febd55babdd' and RAW_AMOUNT>0
group by 1
),
bsc as (
select (b.intt-a.outt) as balance, a.sender as holder
from outflow a join inflow b on a.sender=b.receiver
)
select holder, sum(balance)
from bsc
where balance> 0
group by 1
order by 2 DESC
limit 10
Run a query to Download Data