-
Notifications
You must be signed in to change notification settings - Fork 31
Queries
Luis Cañas-Díaz edited this page Nov 8, 2013
·
3 revisions
SELECT COUNT(*) FROM scmlog;
SELECT COUNT(distinct(scmlog.id)) FROM scmlog, actions
WHERE scmlog.id = actions.commit_id;
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
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
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