yasminTop Contracts with the Highest Users copy
    Updated 8 days ago
    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: 8 days ago
    Contract Name
    Total Unique Users
    1
    Wrapped Avax424635
    2
    Usd//C357016
    3
    Tethertoken326219
    4
    Pangolin Liquidity92452
    5
    0xfae3f424a0a47706811521e3ee268f00cfb5c45e62893
    6
    0xfc828c500c90e63134b2b73537cc6cadff4ce69547798
    7
    0xcda75578328d0cb0e79db7797289c44fa02a77ad47776
    8
    0x12db9758c4d9902334c523b94e436258eb54156f47552
    9
    0xf4c542518320f09943c35db6773b2f9feb2f847e45784
    10
    Folks Usdc45517
    10
    381B
    47s