h4wkall 2
    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 block_timestamp < CURRENT_DATE
    and topics[0] = '0x7d7d1c5b3eadbe275ceb358e65cd57410b35997187258dbaaae42ab6e1405fd8'
    )
    , from_Ethereum as (
    select block_timestamp::date as date,
    'From' as route_type,
    Last run: about 2 months ago
    CHAIN
    TXS
    USER_COUNT
    AMOUNT_USD
    1
    Solana164040550241251192228.27204
    2
    Base11487740972496351995.532907
    3
    Ethereum109334453701018178121.70636
    4
    Arbitrum7797827078603655540.340925
    5
    BSC5696530117238609971.773433
    6
    polygon281561150725093608.0120587
    7
    Avalanche11330497824736414.5174526
    8
    Optimism16049660127863655.1929957
    8
    327B
    1014s