h4wkavalanche 4
    Updated 2024-09-15
    -- forked from avalanche @ https://flipsidecrypto.xyz/edit/queries/95a71809-60d7-48b6-884b-09fea6e9109c

    -- forked from avalanche @ https://flipsidecrypto.xyz/edit/queries/d840d8b7-a669-49f0-869d-1b9d5063c5c1

    -- forked from avalanche @ https://flipsidecrypto.xyz/edit/queries/69ab8a08-39da-4483-a5f3-7a08201c1433

    -- forked from avalanche @ https://flipsidecrypto.xyz/edit/queries/8edfd593-d459-4768-855e-b44c298a562f

    with price as (
    select hour::date as price_date,
    token_address,
    symbol,
    decimals,
    avg(price) as price
    from avalanche.price.ez_prices_hourly
    group by 1,2,3,4
    )
    , avax_price as (
    select hour::date as price_date,
    token_address,
    symbol,
    decimals,
    avg(price) as avax_price
    from avalanche.price.ez_prices_hourly
    where symbol = 'WAVAX'
    group by 1,2,3,4
    )
    , base_from_avalanche as (
    select distinct tx_hash
    from avalanche.core.fact_token_transfers t
    where 1 = 1
    and block_timestamp >= '2023-04-01' and block_timestamp < CURRENT_DATE
    and to_address = '0xef4fb24ad0916217251f553c0596f8edc630eb66'
    )
    , from_avalanche as (
    select block_timestamp::date as date,
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived