flipsidecryptoData App Users over Time
    Updated 2023-05-09
    with daily_counts AS (
    select
    created_at::DATE AS date,
    count(distinct id) AS user_count
    from bi_analytics.velocity_app_prod.users
    where __hevo__marked_deleted = FALSE
    group by 1
    ),
    total_users AS (
    select
    date,
    sum(user_count) over (order by date asc rows between unbounded preceding and current row) AS total_users
    from daily_counts
    ),
    first_query_date AS (
    select
    created_by_id AS user_id,
    min(created_at::DATE) AS date
    from bi_analytics.velocity_app_prod.queries
    group by 1
    ),
    query_users AS (
    select
    date,
    count(distinct user_id) AS user_count
    from first_query_date
    group by 1
    ),
    analysts AS (
    select
    date,
    sum(user_count) over (order by date asc rows between unbounded preceding and current row) AS analysts
    from query_users
    )

    SELECT
    Run a query to Download Data