adriaparcerisasdau base 2 copy
    Updated 2024-02-20

    WITH
    daus as (
    SELECT
    distinct tx_from as users,
    trunc(block_timestamp,'week') as weeks,
    count(distinct trunc(block_timestamp,'day')) as active_days
    from sei.core.fact_transactions
    group by 1,2
    having active_days>=4
    ),
    active_users as (
    SELECT
    distinct tx_from as user,
    min(block_timestamp) as debut
    from sei.core.fact_transactions
    where tx_from in (select users from daus)
    group by 1
    )
    select
    trunc(debut,'week') as date,
    count(distinct user) as new_DAUs,
    sum(new_DAUs) over (order by date) as "Total new DAUs"
    from active_users
    group by 1
    order by 1 asc






    Last run: about 1 year ago
    DATE
    NEW_DAUS
    Total new DAUs
    1
    2023-05-22 00:00:00.0005050
    2
    2023-05-29 00:00:00.000454
    3
    2023-06-05 00:00:00.000458
    4
    2023-06-12 00:00:00.000159
    5
    2023-06-26 00:00:00.000564
    6
    2023-07-03 00:00:00.000266
    7
    2023-07-10 00:00:00.000369
    8
    2023-07-17 00:00:00.000271
    9
    2023-07-24 00:00:00.000778
    10
    2023-07-31 00:00:00.00025103
    11
    2023-08-07 00:00:00.00035138
    12
    2023-08-14 00:00:00.00032143352
    13
    2023-08-21 00:00:00.0009704322
    14
    2023-08-28 00:00:00.0002624584
    15
    2023-09-04 00:00:00.0004455029
    16
    2023-09-11 00:00:00.0001265155
    17
    2023-09-18 00:00:00.0007025857
    18
    2023-09-25 00:00:00.000355892
    19
    2023-10-02 00:00:00.000955987
    20
    2023-10-09 00:00:00.000216008
    38
    1KB
    26s