walemathsTransaction Volume
    Updated 2024-07-04
    with tb1 as (select trunc(block_timestamp,'day') as day,
    token_address,
    SOURCE_CHAIN,
    SYMBOL,
    TX_HASH,
    AMOUNT_USD,
    DESTINATION_ADDRESS
    from near.defi.ez_bridge_activity
    where block_timestamp::date >= '2024-01-01'
    and DESTINATION_CHAIN in ('near','Near')
    and platform = 'rainbow'
    )
    ,
    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 >= '2024-01-01'
    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 >= '2024-01-01'
    and symbol = 'WETH'
    group by 1,2,3
    UNION
    Select trunc(TO_TIMESTAMP(value[0]::string),'day') as day,
    '3ea8ea4237344c9931214796d9417af1a1180770.factory.bridge.near' as TOKEN_CONTRACT,
    'FLUX' as token,
    avg(value[1]) as avg_price
    from (
    SELECT livequery.live.udf_api(
    QueryRunArchived: QueryRun has been archived