Find all of a users answers with a score of 5 or more and computer the lag between the question asked date and the users answered date
Q&A for speakers of other languages learning English
-- Necromancer -- Find all of a users answers with a score of 5 or more and computer the lag between the question asked date and the users answered date DECLARE @UserId int = ##UserId## SELECT --q.Id, q.Title, q.CreationDate AS AskedDate, --a.Id, a.CreationDate AS AnsweredDate, DATEDIFF(day, q.CreationDate, a.CreationDate) AS DaysBetween FROM Posts AS q JOIN Posts AS a ON a.ParentId = q.Id WHERE a.OwnerUserId = @UserId AND a.PostTypeId = 2 AND a.Score >= 5 ;