PapasotAlgo governance 1 rewards distribution
    Updated 2023-01-02
    with table1 as (select amount,
    case
    when amount <= 1 then 'Reward size under 1 ALGO'
    when amount >1 and amount <= 100 then 'Reward size 1-100 ALGO'
    when amount > 100 and amount <= 1000 then 'Reward size 100-1000 ALGO'
    when amount > 1000 then 'Reward size > 1000 ALGO'
    else 'NONE'
    end as distribution
    from algorand.payment_transaction a
    -- join algorand.block b
    -- on a.block_id = b.block_id
    where try_base64_decode_string(tx_message:txn:note::string) ilike 'af/gov1:j{"rewardsPrd":1%'
    and date_trunc('day',block_timestamp) <= '2022-01-05') --is not null

    select distribution,
    count(distribution)
    from table1
    --where distribution = 'NONE'
    group by 1


    Run a query to Download Data