0-MIDmonthly top 10
    Updated 2023-05-09
    with task1 as (
    with act1 as (
    with tab1 as (
    select date_trunc('month',DATE)as month,CURRENCY, ADDRESS
    from osmosis.core.fact_daily_balances
    where currency not like'%pool%'
    group by 1,2,3),
    tab2 as (
    select ADDRESS,PROJECT_NAME
    from osmosis.core.dim_labels)
    select month,PROJECT_NAME,count(distinct tab1.ADDRESS)as wallets
    from tab1
    left join tab2
    on tab1.CURRENCY=tab2.ADDRESS
    where PROJECT_NAME is not null
    group by 1,2)
    select month,PROJECT_NAME,wallets,rank()over(partition by Month order by wallets desc) as rank
    from act1)
    select month,PROJECT_NAME,wallets
    from task1
    where rank<=10





    Run a query to Download Data