Ali3NDately Avalanche => Aptos Bridged Assets Volume
    Updated 2024-10-26
    with pricet as (
    select hour::date as day,
    symbol,
    token_address,
    decimals,
    median (price) as USDPrice
    from aptos.price.ez_prices_hourly
    group by 1,2,3,4

    union all

    select hour::date as day,
    symbol,
    token_address,
    decimals,
    median (price) as USDPrice
    from crosschain.price.ez_prices_hourly
    group by 1,2,3,4

    union all

    select hour::date as day,
    symbol,
    token_address,
    decimals,
    median (price) as USDPrice
    from ethereum.price.ez_prices_hourly
    group by 1,2,3,4)

    select date_trunc ({{Time_Interval}},block_timestamp) as date,
    symbol,
    count (distinct tx_hash) as Bridges,
    count (distinct receiver) as Bridgor,
    sum ((amount_unadj*USDPrice)/pow(10,decimals)) as Volume,
    avg ((amount_unadj*USDPrice)/pow(10,decimals)) as Average_Volume,
    sum (Volume) over (partition by symbol order by date asc) as Cumulative_Volume
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived