yasminTop Contracts with the Highest Users copy
    Updated 2025-05-02
    WITH TransactionData_Last90Days AS (
    SELECT
    t.from_address AS user,
    t.tx_hash,
    l.contract_address,
    l.contract_name
    FROM
    avalanche.core.fact_transactions t
    JOIN
    avalanche.core.ez_decoded_event_logs l ON t.tx_hash = l.tx_hash
    WHERE
    t.block_timestamp >= DATEADD('day', -90, CURRENT_DATE())
    AND l.contract_address IS NOT NULL
    )

    SELECT
    COALESCE(INITCAP(contract_name), contract_address) AS "Contract Name",
    COUNT(DISTINCT user) AS "Total Unique Users"
    FROM
    TransactionData_Last90Days
    GROUP BY
    1, contract_address, contract_name
    ORDER BY
    "Total Unique Users" DESC
    LIMIT 10 ;



    Last run: 17 days ago
    Contract Name
    Total Unique Users
    1
    Wrapped Avax327510
    2
    Tethertoken290744
    3
    Usd//C281827
    4
    0xfae3f424a0a47706811521e3ee268f00cfb5c45e70876
    5
    0xfc828c500c90e63134b2b73537cc6cadff4ce69547028
    6
    0xcda75578328d0cb0e79db7797289c44fa02a77ad47010
    7
    0x12db9758c4d9902334c523b94e436258eb54156f46646
    8
    0xf4c542518320f09943c35db6773b2f9feb2f847e45196
    9
    Folks Usdc44969
    10
    0xcd68014c002184707eae7218516cb0762a44fddf44951
    10
    405B
    38s