SELECT
to_char(updatedat, 'dy') as day_of_week,
extract(dow from updatedat) as dow,
extract(hour from updatedat) as hour,
count(*) as no_of_actions,
count(distinct repo) as no_of_active_repos,
count(distinct org) as no_of_active_orgs,
count(distinct author) as no_of_active_developers
from near.beta.github_activity
group by 1,2,3
order by 2,3