MLDZMNFloor2
    Updated 2022-07-03
    with tb1 as (select
    BLOCK_TIMESTAMP::date as day,
    'stake' as act_type,
    count(distinct tx_hash) as number_action,
    sum(EVENT_INPUTS:value/1e9) as amount_floor
    from ethereum.core.fact_event_logs
    where CONTRACT_ADDRESS = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
    and ORIGIN_TO_ADDRESS='0x759c6de5bca9ade8a1a2719a31553c4b7de02539'
    and EVENT_INPUTS:from !='0x0000000000000000000000000000000000000000' --eliminate the minted amount
    and ORIGIN_FUNCTION_SIGNATURE ='0xd866c9d8'
    and BLOCK_TIMESTAMP>=CURRENT_DATE-90
    group by 1
    ),

    tb2 as (select
    BLOCK_TIMESTAMP::date as day,
    'Swap' as act_type,
    count(distinct tx_hash) as number_action,
    sum(EVENT_INPUTS:value/1e9) as amount_floor
    from ethereum.core.fact_event_logs
    where CONTRACT_ADDRESS = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
    and ORIGIN_FUNCTION_SIGNATURE ='0x5f575529'
    and EVENT_INPUTS:from !='0x0000000000000000000000000000000000000000'
    and BLOCK_TIMESTAMP>=CURRENT_DATE-90
    group by 1
    ),

    tb3 as (select
    BLOCK_TIMESTAMP::date as day,
    'Unstake' as act_type,
    count(distinct tx_hash) as number_action,
    sum(EVENT_INPUTS:value/1e9) as amount_floor
    Run a query to Download Data