Advertisement
knoteva

Untitled

Oct 13th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. SELECT TOP 5 r.Id, r.Name, Count(c.RepositoryId)
  2. FROM Repositories AS r
  3. LEFT JOIN Commits AS c ON r.Id = c.RepositoryId
  4. LEFT JOIN RepositoriesContributors AS rc ON r.Id = rc.RepositoryId
  5. GROUP BY r.Id, r.Name
  6. ORDER BY Count(c.RepositoryId) DESC, r.Id, r.Name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement