strawbettyFolks finance goETH -> Deposits vs Redeems
    Updated 2022-05-26
    -- folks finance:
    select
    block_timestamp::date as date,
    case when TRY_BASE64_DECODE_STRING(tx_message:txn:apaa[0]::STRING) = 'd' then 'Deposit'
    when TRY_BASE64_DECODE_STRING(tx_message:txn:apaa[0]::STRING) = 'r' then 'Redeem' end as action,
    sum(tx_message:dt:itx[0]:txn:aamt/1e9) as goETH_volume,
    count(distinct sender) as users,
    count(distinct tx_group_id) as transactions
    from flipside_prod_db.algorand.transactions
    where
    tx_message:txn:apas[0] in ('386195940', '694408528') -- goETH
    -- deposit:
    and (TRY_BASE64_DECODE_STRING(tx_message:txn:apaa[0]::STRING) = 'd'
    -- redeem:
    or TRY_BASE64_DECODE_STRING(tx_message:txn:apaa[0]::STRING) = 'r'
    )
    group by 1,2
    Run a query to Download Data