drone-mostafaUntitled Query
    Updated 2022-07-01
    with table1 as (select date_trunc('day', block_timestamp) as day,
    sum(amount) as amount_staked
    from flipside_prod_db.ethereum.udm_events
    where to_address = '0x759c6de5bca9ade8a1a2719a31553c4b7de02539'
    and origin_function_signature = '0xd866c9d8'
    group by day),

    table2 as (select date_trunc('day',block_timestamp) as day,
    sum(amount) as amount_unstaked
    from flipside_prod_db.ethereum.udm_events
    where from_address = '0x759c6de5bca9ade8a1a2719a31553c4b7de02539'
    and origin_function_signature = '0x990966d5'
    group by 1)

    select table1.day,
    amount_staked as "Staked",
    amount_unstaked as "Unstaked"
    from table1
    join table2
    on table1.day = table2.day
    Run a query to Download Data