Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT TOP 5 r.Id, r.Name, COUNT(c.RepositoryId)
- FROM Repositories AS r
- LEFT JOIN Commits AS c ON r.Id = c.RepositoryId
- LEFT JOIN RepositoriesContributors AS rc ON r.Id = rc.RepositoryId
- GROUP BY r.Id, r.Name
- ORDER BY COUNT(c.RepositoryId) DESC, r.Id, r.Name
Add Comment
Please, Sign In to add comment