Q&A for gardeners and landscapers
SELECT 'Grand Total' AS Title, SUM(Question.ViewCount) AS ViewCount, SUM(Answer.Score) AS Score FROM Posts AS Answer INNER JOIN PostTypes ON PostTypes.Id = Answer.PostTypeId INNER JOIN Posts AS Question ON Question.Id = Answer.ParentId WHERE PostTypes.Name = 'Answer' AND Answer.OwnerUserId = ##UserId## AND Answer.CommunityOwnedDate IS NULL AND Answer.CreationDate >= 2023-04-01 UNION ALL SELECT Question.Title, Question.ViewCount, Question.Score FROM Posts AS Answer INNER JOIN PostTypes ON PostTypes.Id = Answer.PostTypeId INNER JOIN Posts AS Question ON Question.Id = Answer.ParentId WHERE PostTypes.Name = 'Answer' AND Answer.OwnerUserId = ##UserId## AND Answer.CommunityOwnedDate IS NULL AND Answer.CreationDate >= 2023-04-01 ORDER BY ViewCount DESC