RamaharDevelopers Active Repos
    Updated 2023-01-23
    WITH firstt AS (SELECT
    DISTINCT author,
    repo
    FROM near.beta.github_activity),
    secondt AS (SELECT
    author,
    COUNT(repo) as amount_repos
    FROM firstt
    GROUP BY 1 )
    SELECT
    CASE
    WHEN amount_repos BETWEEN 0 and 5 THEN '0-5 repos'
    WHEN amount_repos BETWEEN 5 and 10 THEN '5-10 repos'
    WHEN amount_repos BETWEEN 10 and 15 THEN '10-15 repos'
    WHEN amount_repos BETWEEN 15 and 20 THEN '15-20 repos'
    ELSE 'More than 20 repos'
    END as repo_category_size,
    COUNT(DISTINCT author) as devs
    FROM secondt
    GROUP BY 1
    Run a query to Download Data