rajsNew Stats
    Updated 2023-01-25
    with dev as
    (
    SELECT
    author,
    min(updatedat) as date_joined
    from near.beta.github_activity
    group by 1
    )
    ,

    org as
    (
    SELECT
    org,
    min(updatedat) as date_joined
    from near.beta.github_activity
    group by 1
    )
    ,

    repo as
    (
    SELECT
    repo,
    min(updatedat) as date_joined
    from near.beta.github_activity
    group by 1
    )

    SELECT
    date_trunc('month', coalesce(d.date_joined, o.date_joined, r.date_joined)) as date,
    count(distinct author) as no_of_new_developers,
    count(distinct org) as no_of_new_organisations,
    count(distinct repo) as no_of_new_repositories,
    sum(no_of_new_developers) over (order by date) as cum_no_of_developers,
    sum(no_of_new_organisations) over (order by date) as cum_no_of_organisations,
    Run a query to Download Data