rezarwzNumber of µ-Tokens traders
    Updated 2023-12-22
    -- forked from Number of µ-Tokens daily traders @ https://flipsidecrypto.xyz/edit/queries/b31f539d-ad89-43e5-bf9a-04b26e2eb48a

    with all_u as (
    SELECT
    tx_hash,
    block_timestamp,
    ORIGIN_FROM_ADDRESS as ua
    FROM
    ethereum.defi.ez_dex_swaps
    WHERE
    TOKEN_IN in (
    SELECT
    DECODED_LOG:floorToken
    from
    ethereum.core.ez_decoded_event_logs
    where
    contract_address = '0x3eb879cc9a0ef4c6f1d870a40ae187768c278da2'
    and event_name = 'NewCollectionSupported'
    )
    or TOKEN_out in (
    SELECT
    DECODED_LOG:floorToken
    from
    ethereum.core.ez_decoded_event_logs
    where
    contract_address = '0x3eb879cc9a0ef4c6f1d870a40ae187768c278da2'
    and event_name = 'NewCollectionSupported'
    )
    )
    SELECT
    date_trunc('{{time_frame}}', block_timestamp) as time,
    count(ua) as user_count
    from all_u
    GROUP by 1
    ORDER by 1 desc


    QueryRunArchived: QueryRun has been archived