Updated 2022-11-04
    --credit to Jinx
    with
    b as(
    select address
    ,sum(balance/ pow(10,6)) as BALANCE
    from osmosis.core.fact_daily_balances
    where CURRENCY = 'uosmo'
    and date::date = CURRENT_DATE-1
    group by 1
    order by 2 desc
    limit 10
    )
    select row_number() over(order by BALANCE desc) as rank
    , * from b


    Run a query to Download Data