Spectersectors
    Updated 2024-10-15
    SELECT
    DATE_TRUNC('week', BLOCK_TIMESTAMP) AS Date,
    INITCAP(label_type) AS label,
    INITCAP(label) AS Project_name,
    COUNT(DISTINCT Sender) AS Addresses
    FROM
    aptos.core.fact_events
    INNER JOIN aptos.core.dim_labels ON Address = EVENT_ADDRESS -- Joining to get the label of the project
    INNER JOIN aptos.core.fact_transactions USING (VERSION) -- Joining transactions and events based on VERSION
    WHERE
    BLOCK_TIMESTAMP >= '2024-01-01'
    AND SUCCESS = TRUE
    AND label_type NOT IN ('cex', 'token')
    AND Project_name IS NOT NULL
    GROUP BY
    Date, label_type, Project_name
    ORDER BY
    Date; -- Ordering by date

    QueryRunArchived: QueryRun has been archived