bachiOHM transactions - staked Vs. unstaked
    Updated 2022-04-15

    --with dtls as (
    SELECT
    date(block_timestamp) as day,
    count(distinct tx_id) as num_of_trans,
    case when amount_out > 0 and amount_out is not null Then 'Unstaked OHM'
    when amount_in > 0 and amount_in is not null Then 'Staked OHM'
    end as Transaction_type
    FROM ethereum.dex_swaps
    WHERE token_address = '0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5'
    group by 1,3
    --)

    --select day, transaction_type, sum(volume) as total_volume from dtls group by 1,2


    Run a query to Download Data