kasadeghUntitled Query
    Updated 2022-12-03
    with holder_balace_on_osmosis as
    (
    select date,
    address,
    sum (balance/pow(10,decimal)) as Balance
    from osmosis.core.fact_daily_balances
    where currency = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    group by 1,2
    )

    select 'Osmosis' as chain,
    date_trunc (week,date) as week,
    case when balance < 10 then 'c1: Less Than 10 $AXL'
    when balance >= 10 and balance < 1000 then 'c2: 10 - 1k $AXL'
    when balance >= 1000 and balance < 100000 then 'c3: 1K - 100K $AXL'
    when balance >= 100000 and balance < 1000000 then 'c4: 100K - 1M $AXL'
    when balance >= 1000000 and balance < 10000000 then 'c5: 1M - 10M $AXL'
    when balance >= 10000000 and balance < 100000000 then 'c6: 10M - 100M $AXL'
    else 'c7: More Than 100M $AXL'
    end as balance_type,
    count (distinct address) as holder_count
    from holder_balace_on_osmosis
    group by 1 ,2,3
    order by 3

    Run a query to Download Data