Defi InsightsVertex Protocol (VRTX)
    Updated 2024-05-23
    with db as(
    select
    token_in as token,
    amount_in_usd as value,
    amount_in as amount,
    block_timestamp
    from
    arbitrum.defi.ez_dex_swaps
    union
    all
    select
    token_out as token,
    amount_out_usd as value,
    amount_out as amount,
    block_timestamp
    from
    arbitrum.defi.ez_dex_swaps
    )
    select
    date_trunc('day', block_timestamp) as day,
    sum(amount) as amount,
    sum(value) as value,
    avg(value / amount) as price
    from
    db
    where
    token = '0x95146881b86b3ee99e63705ec87afe29fcc044d9'
    and amount > 0
    and value > 0
    group by
    1
    order by
    1 desc


    QueryRunArchived: QueryRun has been archived