TomoDataFloor * 2
    Updated 2022-07-11
    select
    'staking' as action,
    date_trunc (day,BLOCK_TIMESTAMP) AS days ,
    sum (RAW_AMOUNT)/1e9 as volume,
    sum(volume)over(order by days) as volume_growth
    from
    ethereum.core.fact_token_transfers
    where
    ORIGIN_FUNCTION_SIGNATURE = '0xd866c9d8'
    and
    CONTRACT_ADDRESS = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
    and days >= current_date - interval '3 months'
    group by days

    union all

    select
    'REWARDS' as action,
    date_trunc (day,BLOCK_TIMESTAMP) AS days ,
    -- count (distinct tx_hash) as tx_count,
    -- count (distinct ORIGIN_FROM_ADDRESS) as wallet_count,
    sum (RAW_AMOUNT)/1e9 as volume,
    sum(volume)over(order by days) as volume_growth
    from
    ethereum.core.fact_token_transfers
    where
    ORIGIN_FUNCTION_SIGNATURE = '0xaf14052c'
    and
    CONTRACT_ADDRESS = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
    and days >= current_date - interval '3 months'
    group by days

    union all
    select
    'unstaking' as action,
    date_trunc (day,BLOCK_TIMESTAMP) AS days ,
    Run a query to Download Data