Q&A about the site for students and teachers of all martial arts
DECLARE @UserID Int = ##UserID?9449426## SELECT a.Id AS [Post Link] FROM Posts a WHERE a.OwnerUserId = @UserID AND a.PostTypeId = 2 SELECT a.Id AS [Post Link] FROM Posts a JOIN Posts q ON a.ParentId = q.Id JOIN Users asker ON q.OwnerUserId = asker.Id WHERE a.OwnerUserId = @UserID AND a.PostTypeId = 2 AND q.PostTypeId = 1 --WHERE asker.Score