ML6users : to
Updated 2022-06-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 amount_receive as
(select receiver ,sum(amount/pow(10,decimal)) as am_in
from
osmosis.core.fact_transfers
where currency like '%uosmo%'
group by 1)
, amount_send as
(select sender,sum(amount/pow(10,decimal)) as am_out
from osmosis.core.fact_transfers
where currency like '%uosmo%'
group by 1)
,Whales as (select (am_in-am_out) as total,sender
from amount_receive
inner join amount_send
on sender=receiver
where total>50000 )
select label,count(1)
from osmosis.core.fact_swaps as swaps
inner join osmosis.core.dim_labels as labels
on swaps.to_currency=labels.address
where trader not in (select sender from Whales)
group by 1
order by 2 DESC
limit 10
Run a query to Download Data