SELECT
date,
case when no_of_actions = 1 then 'One Time'
when no_of_actions between 2 and 10 then 'Part Time'
else 'Full Time' end as developer_status,
count(author) as no_of_developers,
sum(no_of_actions) as no_of_actions
from
(
SELECT
date_trunc('month', updatedat) as date,
author,
count(*) as no_of_actions
from near.beta.github_activity
group by 1,2
)
group by 1,2
order by 1,2