ML6users : to
    Updated 2022-06-18
    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