rajs% of Actions by Rank
    Updated 2023-01-25
    SELECT
    date,
    case when rank = 1 then 'Top 1'
    when rank between 2 and 6 then '2-5'
    when rank between 6 and 21 then '6-20'
    else 'Others' end as category,
    sum(no_of_actions) as no_of_actions
    FROM
    (
    SELECT
    date_trunc('month', updatedat) as date,
    author,
    rank() over (partition by date order by count(*) desc) as rank,
    count(*) as no_of_actions
    from near.beta.github_activity
    group by 1,2
    )
    group by 1,2
    Run a query to Download Data