bachiAlgorand Governance period2
    Updated 2022-03-15
    with coms2 as (
    select distinct sender as wallet,
    'COMMITED' as temp
    from algorand.payment_transaction
    where try_base64_decode_string(tx_message:txn:note) like '%gov%'
    and block_id > (select block_id from algorand.block where block_timestamp > '2022-01-31' order by 1 limit 1)
    and block_id < (select block_id from algorand.block where block_timestamp < '2022-02-28' order by 1 desc limit 1)
    ),
    no_coms2 as (
    select
    address as wallet,
    'NOT COMMITED' as temp
    from algorand.account
    where created_at < (select block_id from algorand.block where block_timestamp < '2022-02-28' order by 1 desc limit 1)
    and (closed_at > (select block_id from algorand.block where block_timestamp > '2022-02-28' order by 1 desc limit 1)
    or closed_at is null)
    and wallet not in (select address from algorand.account where closed_at < (select block_id from algorand.block where block_timestamp < '2022-01-31' order by 1 desc limit 1))
    and wallet not in (select wallet from coms2)
    ),
    tabunion as (
    select * from coms2
    union all
    select * from no_coms2
    )
    select
    temp,
    count(*)
    from tabunion
    group by 1
    order by 1
    Run a query to Download Data