ArioVertex - Daily TVL ($) by Assets
    Updated 2024-04-18
    with priceT as (
    select
    date_trunc(day, hour) as date,
    TOKEN_ADDRESS,
    symbol,
    avg(PRICE) as Price
    from
    arbitrum.price.ez_hourly_token_prices
    where
    1 = 1
    and token_address in (
    select
    DISTINCT TOKEN_ADDRESS
    from
    arbitrum.vertex.ez_clearing_house_events
    )
    group by
    1,
    2,
    3
    ),
    tab1 as (
    select
    date_trunc(day, block_timestamp) as date,
    token_address,
    sum(zeroifnull(amount)) as TVL_Token,
    sum(TVL_Token) over(
    partition by token_address
    order by
    date
    ) as D_TVL
    from
    arbitrum.vertex.ez_clearing_house_events
    group by
    1,
    2
    QueryRunArchived: QueryRun has been archived