Skip to content

Instantly share code, notes, and snippets.

@ahachete
Created November 30, 2016 11:45
Show Gist options
  • Save ahachete/b19eec31e5e9b57850aa848f1ea50a3d to your computer and use it in GitHub Desktop.
Save ahachete/b19eec31e5e9b57850aa848f1ea50a3d to your computer and use it in GitHub Desktop.
SELECT repo.name_s, avg(payload.size_i)
FROM github.events AS events
INNER JOIN github.events_repo AS repo ON (events.did = repo.did)
INNER JOIN github.events_payload AS payload ON (events.did=payload.did)
WHERE events.type_s = 'PushEvent' AND payload.size_i > 2
GROUP BY repo.name_s
ORDER BY avg DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment