yasmin-n-d-r-hUntitled Query
    Updated 2022-08-14
    select
    'staking' as type,
    DATE_TRUNC('day', block_timestamp) AS day,
    COUNT(DISTINCT ORIGIN_FROM_ADDRESS) as "Users Count",
    count (distinct tx_hash) as TX_Count
    from
    optimism.velodrome.ez_staking_actions
    where
    STAKING_ACTION_TYPE = 'deposit'
    group by
    2
    UNION
    select
    'unstaking',
    DATE_TRUNC('day', block_timestamp),
    COUNT(DISTINCT ORIGIN_FROM_ADDRESS) as "Users Count",
    count (distinct tx_hash) as TX_Count
    from
    optimism.velodrome.ez_staking_actions
    where
    STAKING_ACTION_TYPE = 'withdraw'
    group by
    2


    Run a query to Download Data