Most Viewed Questions Answered

1

Please login or register to vote for this query.

(click on this box to dismiss)

DevOps Meta

Q&A about the site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure

DECLARE @UserId int = ##UserId##
-- DECLARE @TopCount int = ##Count:int?10## -- Optional parameter?
-- How to return Yes/No if AID=MID?

SELECT TOP 100
    p.Id AS [Post Link],
    u.Id AS [User Link],
    p.CreationDate AS Created,
    p.ViewCount AS Views,
    p.AnswerCount AS AC,
    p.AcceptedAnswerId AS AID,
    a.Id AS MID,
    p.Score AS QS,
    a.Score AS MS,
    p.CommentCount AS QC,
    a.CommentCount AS MC,
    p.Tags
FROM Posts a 
JOIN Posts p ON a.ParentID=p.Id
JOIN Users u ON p.OwnerUserId=u.Id

WHERE a.OwnerUserId=@UserId
AND p.CreationDate >= '2024-01-01'

ORDER BY Views DESC

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results