NakedCollectorEthereum Active Wallets
    Updated 2024-07-17
    with active as(
    SELECT
    date_trunc('{{interval}}', block_timestamp) as date,
    count(DISTINCT from_address) as active_wallets
    FROM
    ethereum.core.fact_transactions
    WHERE
    status = 'SUCCESS'
    and block_timestamp >= '{{start_date}}'
    GROUP BY
    1
    ),
    new as (
    SELECT
    date_trunc('{{interval}}', first_tx) as date,
    count(DISTINCT from_address) as new_wallets,
    sum(new_wallets) over(
    ORDER BY
    date
    ) as cum_new_wallets
    FROM
    (
    SELECT
    from_address,
    min (block_timestamp) as first_tx
    FROM
    ethereum.core.fact_transactions
    WHERE
    status = 'SUCCESS'
    and block_timestamp >= '{{start_date}}'
    GROUP BY
    1
    )
    GROUP BY
    1
    ORDER BY
    QueryRunArchived: QueryRun has been archived