Afonso_DiazToken Pairs
    Updated 2025-04-03
    with

    pricet as (
    select
    hour::date as date,
    symbol,
    decimals,
    token_address,
    avg(price) as token_price_usd
    from
    boba.price.ez_prices_hourly
    group by 1, 2, 3, 4

    union all

    select
    hour::date as date,
    'ETH',
    decimals,
    '0x0000000000000000000000000000000000000000',
    avg(price)
    from
    boba.price.ez_prices_hourly
    where
    token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1, 2, 3, 4
    ),

    swaps as (

    select
    tx_hash,
    block_timestamp,
    nvl(decoded_log:receiver, origin_from_address) as swapper,
    decoded_log:fromAmount as amount_in_unadj,
    decoded_log:toAmount as amount_out_unadj,
    QueryRunArchived: QueryRun has been archived