Updated 2022-11-04
    --credit to Jinx
    with a as(
    select address
    ,sum(balance/ pow(10,6)) as old_balance
    from osmosis.core.fact_daily_balances
    where CURRENCY = 'uosmo'
    and date::date = '2022-01-01'
    group by 1
    order by 2 desc
    limit 100
    )
    ,
    aa as (
    select row_number() over(order by old_balance desc) as old_rank, '1' AS COUNT_
    , * from a
    )
    ,
    B as(
    select address
    ,sum(balance/ pow(10,6)) as NEW_balance
    from osmosis.core.fact_daily_balances
    where CURRENCY = 'uosmo'
    and date::date = CURRENT_DATE-1
    AND address IN (SELECT address FROM AA)
    group by 1
    order by 2 desc
    limit 100
    )
    ,
    BB as (
    select '1' AS COUNT_
    , * from B
    )

    SELECT
    case when address IN (SELECT address FROM bb) then 'Still one of top 100 holders' when address not IN (SELECT address FROM bb) then 'not one of new top 100 holders' end as status,
    Run a query to Download Data