Q&A for Ubuntu users and developers
-- Legendary Badge advancement -- Retrieve how often you reached the reputation cap DECLARE @UserId int = ##UserId## SELECT COUNT(*) * 10 as Votes, Votes.CreationDate AS CreationDate, Posts.Id AS [Post Link] FROM Posts INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Posts.OwnerUserId = @UserId AND Posts.CommunityOwnedDate IS NULL GROUP BY Votes.CreationDate, Posts.Id HAVING (COUNT(*) * 10) >= 150