Q&A for people looking to bypass life's everyday problems with simple tricks
DECLARE @minReputation int = ##minReputation## DECLARE @countTreshold int = ##countTreshold## SELECT source.Id AS Source, target.Id AS Target, Count(1) AS Strength FROM Comments c INNER JOIN Users source ON c.UserId = source.Id AND source.Reputation >= @minReputation INNER JOIN Users target ON target.Id IN (SELECT OwnerUserId FROM Posts WHERE Id = c.PostId) WHERE source.Id != target.Id GROUP BY source.Id, target.Id HAVING Count(1) >= @countTreshold ORDER BY Count(1) DESC