Eman-RazTop 10 Addresses that have Collected the Largest Amount of ATOM
Updated 2023-02-21
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
›
⌄
with table1 as (
with tab1 as (select sender as "Address", sum(amount)/pow(10,6) as volume_out
from cosmos.core.fact_transfers
where tx_succeeded='TRUE' and block_timestamp::date>='2023-01-01'
and currency='uatom'
group by 1
order by 1),
tab2 as (select receiver as "Address", sum(amount)/pow(10,6) as volume_in
from cosmos.core.fact_transfers
where tx_succeeded='TRUE' and block_timestamp::date>='2023-01-01'
and currency='uatom'
group by 1
order by 1)
select tab1."Address" as "Address", volume_out, volume_in, case
when volume_out is null then 0
else volume_out
end as "Volume Out", case
when volume_in is null then 0
else volume_in
end as "Volume In"
from tab1 left join tab2 on tab1."Address"=tab2."Address")
select "Address", -"Volume Out" as "Volume Out", "Volume In", "Volume In"-"Volume Out" as "Net Volume"
from table1
order by 4 desc
limit 10
Run a query to Download Data