Updated 2024-01-18
    with ethereum_price as (
    select hour::date as price_date,
    token_address,
    symbol,
    decimals,
    avg(price) as price
    from Ethereum.price.ez_hourly_token_prices
    group by 1,2,3,4
    )
    , ETH_price as (
    select hour::date as price_date,
    token_address,
    symbol,
    decimals,
    avg(price) as ETH_price
    from ethereum.price.ez_hourly_token_prices
    where symbol = 'WETH'
    group by 1,2,3,4
    )
    , base_from_Ethereum as (
    select distinct tx_hash
    from Ethereum.core.fact_token_transfers t
    where 1 = 1
    and block_timestamp >= CURRENT_DATE - 90 and block_timestamp < CURRENT_DATE
    and to_address = '0xef4fb24ad0916217251f553c0596f8edc630eb66'
    )
    , ethereum_cancelled_tx as (
    select tx_hash
    FROM ethereum.core.fact_event_logs
    where 1 = 1
    and block_timestamp >= CURRENT_DATE - 90
    and topics[0] = '0x7d7d1c5b3eadbe275ceb358e65cd57410b35997187258dbaaae42ab6e1405fd8'
    )
    , from_Ethereum as (
    select block_timestamp::date as date,
    'From' as route_type,
    Last run: about 1 year ago
    TXS
    USER_COUNT
    AMOUNT_USD
    TOTAL_FEE
    1
    202779163807548001136.739022610416.850967012
    1
    51B
    1021s