by sdesol · 4y ago · 0 comments
month | authors | commits | files | churn
---------+---------+---------+-------+-------
2022-02 | 21 | 62 | 84 | 4387
2022-01 | 26 | 109 | 243 | 32429
2021-12 | 33 | 99 | 198 | 10461
2021-11 | 19 | 49 | 77 | 6960
2021-10 | 26 | 64 | 371 | 13626
2021-09 | 18 | 41 | 68 | 2258
2021-08 | 11 | 17 | 25 | 1924
2021-07 | 17 | 30 | 51 | 2704
2021-06 | 14 | 31 | 28 | 1708
2021-05 | 9 | 17 | 35 | 1606
2021-04 | 11 | 46 | 99 | 4224
2021-03 | 16 | 36 | 143 | 84711) https://oss.gitsense.com/insights/github?q=pull-age%3A%3C%3D...
select
commit_ym AS month,
count(distinct(author_email)) as authors,
count(distinct(commit_id)) as commits,
count(distinct(path_id)) as files,
sum(total) as churn
from
z1_commits_422 as commits,
z1_changes_422 as changes,
z1_code_churn_422 as churn
where
commits.id=changes.commit_id and
changes.code_churn_id=churn.id and
lang='java'
group by commit_ym
order by commit_ym desc
limit 12
By having most of Git's history in SQL, I can slice, dice and cross-reference code history, which is how my product works.