SniperDaily Share of New Users
    Updated 5 days ago
    with tbl as (
    SELECT
    block_timestamp,
    tx_hash,
    type,
    from_address as user,
    FROM kaia.core.fact_transactions tx
    JOIN (
    SELECT
    distinct tx_hash,
    label_type as type,
    -- project_name as dex,
    block_timestamp
    FROM kaia.core.fact_event_logs
    join kaia.core.dim_labels on contract_address = address
    where
    --label_type = 'dex'
    tx_succeeded = 'TRUE'
    and block_timestamp::date >= '2024-01-01'
    ) using(block_timestamp, tx_hash)
    ),

    new as ( select min(block_timestamp::date) as date,
    type,
    user
    from tbl
    group by 2,3)

    select trunc(date,'day') as daily,
    type,
    count(DISTINCT user) as "New Users",
    sum("New Users") over (order by daily asc) as "Cumulative New Users"
    from new
    where daily >= '2025-01-01'
    group by 1,2

    Last run: 5 days ago
    DAILY
    TYPE
    New Users
    Cumulative New Users
    1
    2025-01-20 00:00:00.000games22752304676
    2
    2025-01-27 00:00:00.000dex4471742483
    3
    2025-01-10 00:00:00.000defi450114781
    4
    2025-03-18 00:00:00.000dapp426896701
    5
    2025-03-13 00:00:00.000token5815735062
    6
    2025-01-13 00:00:00.000token645140188
    7
    2025-04-02 00:00:00.000nft10616966382
    8
    2025-01-07 00:00:00.000dapp5477167
    9
    2025-01-10 00:00:00.000nft25114781
    10
    2025-03-29 00:00:00.000games105966414215634
    11
    2025-01-11 00:00:00.000dex2083124766
    12
    2025-03-23 00:00:00.000defi38110531079
    13
    2025-04-03 00:00:00.000dex161017616574
    14
    2025-01-21 00:00:00.000defi571317992
    15
    2025-03-05 00:00:00.000dex15204204180
    16
    2025-01-18 00:00:00.000chadmin38255099
    17
    2025-04-13 00:00:00.000nft8323313707
    18
    2025-03-22 00:00:00.000token2479481304
    19
    2025-02-28 00:00:00.000games559813866184
    20
    2025-03-01 00:00:00.000bridge3973942715
    ...
    832
    39KB
    233s