Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games
SELECT sum(Amount) FROM ( SELECT PostId, Count(*) AS Amount FROM Votes v JOIN Posts p ON v.PostId=p.Id WHERE v.CreationDate > DATEADD(DD, 30, p.CreationDate) AND VoteTypeId In (2,3) AND p.OwnerUserId = ##UserId## GROUP BY PostId ) AS v