Queries

Luis Cañas-Díaz edited this page Nov 8, 2013 · 3 revisions

Number of commits with merges

SELECT COUNT(*) FROM scmlog;

Number of commits without merges (with no action associated)

SELECT COUNT(distinct(scmlog.id)) FROM scmlog, actions
WHERE scmlog.id = actions.commit_id;

Top 100 git authors, all history

SELECT COUNT(distinct(scmlog.id)) as total, people.email, people.name
FROM scmlog, actions, people
WHERE scmlog.id = actions.commit_id
AND scmlog.author_id = people.id
GROUP BY people.email
ORDER BY total DESC
LIMIT 100

Top 100 git authors, 2013

SELECT COUNT(distinct(scmlog.id)) as total, people.email, people.name
FROM scmlog, actions, people
WHERE scmlog.id = actions.commit_id
AND scmlog.author_id = people.id
AND YEAR(scmlog.date) = 2013
GROUP BY people.email
ORDER BY total DESC
LIMIT 100

Top 100 git authors of merges, 2013

SELECT COUNT(distinct(scmlog.id)) as total, people.email, people.name
FROM scmlog, people
WHERE scmlog.id NOT IN (SELECT commit_id FROM actions)
AND scmlog.author_id = people.id
AND YEAR(scmlog.date) = 2013
GROUP BY people.email
ORDER BY total DESC
LIMIT 100
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.