Hadisehaxelar recap 5
    Updated 2022-12-03
    with tb as ( select date,
    address,
    balance/pow(10,decimal) as total_amount
    from osmosis.core.fact_daily_balances
    where currency = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    and date >= '2022-09-26')

    select date,
    case when total_amount > 0 and total_amount <= 10 then ' 1-10 Axl'
    when total_amount > 10 and total_amount <= 100 then '10-100 Axl'
    when total_amount > 100 and total_amount <= 500 then '100-500 Axl'
    when total_amount > 500 and total_amount <= 1000 then '500-1000 Axl'
    when total_amount > 1000 and total_amount <= 5000 then '1000-5000 Axl'
    when total_amount > 5000 and total_amount <= 10000 then '5000-10000 Axl'
    when total_amount > 10000 and total_amount <= 50000 then '10000-50000 Axl'
    when total_amount > 50000 then '+50000 Axl' end as balance_type,
    count(DISTINCT address) as total_holder,
    sum(total_amount) as amount
    from tb
    group by date,balance_type
    order by date
    Run a query to Download Data