Flipside Community3a) Trade volume among new users optimism defi
    Updated 2024-11-03
    -- forked from 3a) Trade volume among new users @ https://flipsidecrypto.xyz/edit/queries/9c0fcc7d-b004-4c15-a126-2f008da4bcbc

    with optimism as
    (
    with addresses as
    (
    select from_address, min(block_timestamp) as first_transaction_sent
    from optimism.core.fact_transactions
    group by from_address
    having first_transaction_sent >= '{{Start_date}}'
    ),
    volume_traded as
    (
    (
    select block_timestamp::date as date, origin_from_address as from_address,amount_in_usd as amount_usd from optimism.defi.ez_dex_swaps
    where block_timestamp >= '{{Start_date}}'
    and origin_from_address in ( select from_address from addresses)
    )
    )



    select 'optimism' as chain, date, sum(amount_usd) as trade_volume from volume_traded group by date
    )

    select * from optimism









    QueryRunArchived: QueryRun has been archived