Skip to content

Instantly share code, notes, and snippets.

@ahachete
Created November 30, 2016 11:45
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 ahachete/b1b30382ade7de7039cf8f5cb237d8b5 to your computer and use it in GitHub Desktop.
Save ahachete/b1b30382ade7de7039cf8f5cb237d8b5 to your computer and use it in GitHub Desktop.
WITH distinct_commits AS (
SELECT DISTINCT repo.name_s, actor.login_s
FROM github.events AS events
INNER JOIN github.events_actor AS actor ON (events.did = actor.did)
INNER JOIN github.events_repo AS repo ON (events.did = repo.did)
WHERE events.type_s = 'PushEvent'
)
SELECT name_s, count(*)
FROM distinct_commits
GROUP BY name_s
ORDER BY count DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment