Skip to content

Instantly share code, notes, and snippets.

@patrickdevivo
Created July 25, 2021 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickdevivo/b6c2feb9c19a9180debbb4d30b5ffeac to your computer and use it in GitHub Desktop.
Save patrickdevivo/b6c2feb9c19a9180debbb4d30b5ffeac to your computer and use it in GitHub Desktop.
-- commit counts by author email domain
SELECT
count(*),
substr(author_email, instr(author_email, '@')+1) AS email_domain -- https://sqlite.org/lang_corefunc.html
FROM commits
WHERE parents < 2 -- ignore merge commits
GROUP BY email_domain
ORDER BY count(*) DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment