ngxuan885Market Volatility II: stake and unstake
    Updated 2022-05-26
    with unstake as (
    select BLOCK_TIMESTAMP::date as date, sum(amount) as unstaked -- , count(DISTINCT TX_ID) as unstake_actions
    from flipside_prod_db.ethereum.udm_events
    where from_address = '0x8798249c2e607446efb7ad49ec89dd1865ff4272'
    and symbol = 'SUSHI'
    and amount > 0
    and BLOCK_TIMESTAMP::date between '2022-05-07' and '2022-05-14'
    group by 1),

    stake as (

    select BLOCK_TIMESTAMP::date as date, sum(amount) as staked -- , count(DISTINCT TX_ID) as stake_actions
    from flipside_prod_db.ethereum.udm_events
    where to_address = '0x8798249c2e607446efb7ad49ec89dd1865ff4272'
    and symbol = 'SUSHI'
    and amount > 0
    and BLOCK_TIMESTAMP::date between '2022-05-07' and '2022-05-14'
    group by 1)

    SELECT s.date, staked, unstaked -- , unstake_actions, stake_actions
    from stake s JOIN unstake u on s.date = u.date order by 1
    Run a query to Download Data