0-MIDiden osmo liq
    Updated 2023-05-08
    with tab1 as (
    select address as osmo_start_users,BALANCE/1e6 as osmo_bal_amount,rank()over(order by osmo_bal_amount)as rank
    from osmosis.core.fact_daily_balances
    where currency = 'uosmo'
    and BALANCE_TYPE='liquid'
    and date = '2022-01-01'
    group by 1,2
    order by 2 desc
    limit 100),
    tab2 as (
    select address as osmo_currently_users,BALANCE/1e6 as osmo_bal_amount,rank()over(order by osmo_bal_amount)as rank
    from osmosis.core.fact_daily_balances
    where currency = 'uosmo'
    and BALANCE_TYPE='liquid'
    and date = current_date
    group by 1,2
    order by 2 desc
    limit 100)
    select count(distinct osmo_start_users)as start_top_100
    , case
    when osmo_start_users in(select osmo_currently_users from tab2) then 'Same Holders'
    when osmo_start_users not in (select osmo_currently_users from tab2) then 'Other Holders' end as top_100
    from tab1
    group by 2
    Run a query to Download Data