h4wkall 5
    Updated 2024-07-27
    with ethereum_price as (
    select hour::date as price_date,
    token_address,
    symbol,
    decimals,
    avg(price) as price
    from Ethereum.price.ez_prices_hourly
    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_prices_hourly
    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 2 months ago
    TXS
    USER_COUNT
    AMOUNT_USD
    TOTAL_FEE
    1
    5753154187793685424257.260843257559.18656684
    1
    51B
    1026s