Mrftidefensive-plum
    Updated 2025-01-26
    WITH first_tbl AS (
    SELECT
    a.from_address,
    MIN(DATE_TRUNC('day', a.block_timestamp)) AS first_date
    FROM berachain.testnet.fact_traces a
    WHERE
    a.type LIKE '%CREATE%'
    AND a.to_address IS NOT NULL
    AND a.input IS NOT NULL
    AND a.input != '0x'
    GROUP BY 1
    ),
    daily_new_deployers AS (
    SELECT
    DATE_TRUNC('day', a.block_timestamp) AS date,
    COUNT(DISTINCT a.from_address) AS daily_new_deployers
    FROM berachain.testnet.fact_traces a JOIN first_tbl b ON a.from_address = b.from_address
    WHERE DATE_TRUNC('day', a.block_timestamp) = b.first_date
    GROUP BY 1
    ),
    cumulative_deployers AS (
    SELECT
    date,
    daily_new_deployers,
    SUM(daily_new_deployers) OVER (ORDER BY date) AS cumulative_deployers
    FROM daily_new_deployers
    )

    SELECT
    date,
    daily_new_deployers AS "Daily New Unique Contract Deployers",
    cumulative_deployers AS "Cumulative Unique Contract Deployers"
    FROM cumulative_deployers
    ORDER BY 1
    Last run: 2 months ago
    DATE
    Daily New Unique Contract Deployers
    Cumulative Unique Contract Deployers
    1
    2024-06-07 00:00:00.0004040
    2
    2024-06-08 00:00:00.00025532593
    3
    2024-06-09 00:00:00.00072600
    4
    2024-06-10 00:00:00.0001002700
    5
    2024-06-11 00:00:00.000772777
    6
    2024-06-12 00:00:00.000712848
    7
    2024-06-13 00:00:00.000542902
    8
    2024-06-14 00:00:00.0008703772
    9
    2024-06-15 00:00:00.0006194391
    10
    2024-06-16 00:00:00.000544445
    11
    2024-06-17 00:00:00.000824527
    12
    2024-06-18 00:00:00.000734600
    13
    2024-06-19 00:00:00.0001924792
    14
    2024-06-20 00:00:00.0001004892
    15
    2024-06-21 00:00:00.000914983
    16
    2024-06-22 00:00:00.0003555338
    17
    2024-06-23 00:00:00.0001915529
    18
    2024-06-24 00:00:00.0001865715
    19
    2024-06-25 00:00:00.0002225937
    20
    2024-06-26 00:00:00.0002466183
    ...
    234
    9KB
    269s