Updated 2024-08-21
    with base_data as (
    select
    block_timestamp,
    tx_hash,
    from_address,
    to_address,
    input_data,
    origin_function_signature
    from berachain.testnet.fact_transactions
    where origin_function_signature = '0x60806040'
    ),
    distinct_addresses_by_day as (
    select
    date_trunc('day', block_timestamp) as day,
    from_address,
    row_number() over (partition by from_address order by block_timestamp) as rn
    from base_data
    ),
    unique_addresses_per_day as (
    select
    day,
    from_address
    from distinct_addresses_by_day
    where rn = 1
    ),
    cumulative_unique_addresses as (
    select
    day,
    count(from_address) over (order by day rows between unbounded preceding and current row) as cumulative_unique_addresses
    from unique_addresses_per_day
    )
    select
    day,
    max(cumulative_unique_addresses) as deployers
    from cumulative_unique_addresses
    group by day
    QueryRunArchived: QueryRun has been archived