MasiDaily Bridge Nov Vs. Oct
    Updated 2024-12-06
    with tb1 as (select trunc(block_timestamp,'day') as day,
    token_address,
    SOURCE_CHAIN,
    SYMBOL,
    TX_HASH,
    platform,
    AMOUNT_USD,
    DESTINATION_ADDRESS
    from near.defi.ez_bridge_activity
    where block_timestamp::date >= current_date - 91
    and DESTINATION_CHAIN in ('near','Near')
    )
    ,
    tb2 as ( select hour::date as day,
    token_address as TOKEN_CONTRACT,
    symbol as token,
    avg(price) as avg_price
    from crosschain.price.ez_prices_hourly
    where hour::date >= current_date - 91
    group by 1,2,3
    UNION
    select trunc(hour,'day') as day,
    'aurora' as TOKEN_CONTRACT,
    'ETH' as token,
    avg(price) as avg_price
    from ethereum.price.ez_prices_hourly
    where hour::date >= current_date - 91
    and symbol = 'WETH'
    group by 1,2,3
    UNION
    select trunc(hour,'day') as day,
    '48afbbd342f64ef8a9ab1c143719b63c2ad81710.factory.bridge.near' as TOKEN_CONTRACT,
    'MPETH' as token,
    avg(price) as avg_price
    from ethereum.price.ez_prices_hourly
    where hour::date >= current_date - 91
    QueryRunArchived: QueryRun has been archived