Q&A about the site for Ubuntu users and developers
SELECT pt.Name as [PostType], p.Id as [Post Link], p.CreationDate, p.Score, 3 - p.PostTypeId + -- Comment out the case if answers should have weight 1, -- regardless of if they are the accepted answer. CASE WHEN p2.AcceptedAnswerId = p.Id THEN 2 ELSE 0 END AS Weight FROM Posts p JOIN PostTypes pt ON p.PostTypeId = pt.Id JOIN PostTags ptag ON p.Id = ptag.PostId JOIN Tags t ON t.Id = ptag.TagId LEFT JOIN Posts p2 ON p.ParentId = p2.Id WHERE t.TagName like '%comic%' AND p.OwnerUserId = (SELECT TOP 1 Id FROM Users WHERE DisplayName = ##DisplayName:string##) and p.CreationDate BETWEEN convert(Date, ##StartDate:string##) and convert(Date, ##EndDate:string##)