Pine Analyticsnotable-ivory
    Updated 2024-12-09
    with tab1 as (
    SELECT tx_hash
    FROM base.core.ez_token_transfers
    where to_address like lower('0x0b480f79d77524588E29FBdBB3454f66279B16a4')
    AND block_timestamp > '2024-12-01'

    union all

    SELECT tx_hash
    FROM base.core.ez_native_transfers
    where to_address like lower('0x0b480f79d77524588E29FBdBB3454f66279B16a4')
    AND block_timestamp > '2024-12-01'
    )

    SELECT
    date(block_timestamp) as date,
    count(*) as swaps,
    count(DISTINCT ORIGIN_FROM_ADDRESS) as swappers,
    sum(case when not AMOUNT_IN_USD is NULL then AMOUNT_IN_USD when not AMOUNT_out_USD is NULL then AMOUNT_out_USD end) as swap_volume_usd

    FROM base.defi.ez_dex_swaps
    where tx_hash in (SELECT * from tab1)
    AND block_timestamp > '2024-12-01'
    GROUP BY 1


    QueryRunArchived: QueryRun has been archived