Q&A about the site for Muslims, experts in Islam, and those interested in learning more about Islam
DECLARE @UserId int = ##UserId## select ROW_NUMBER() over (order by someQuestion.ViewCount) as rn, someQuestion.Id as [Post Link], someQuestion.ViewCount, someQuestion.CommentCount as comms, someQuestion.AnswerCount, someQuestion.FavoriteCount as favs, yourAnswer.Score as YourScore, someQuestion.Tags from Posts yourAnswer join Posts someQuestion on yourAnswer.ParentID=someQuestion.Id where yourAnswer.OwnerUserId=@UserId order by ViewCount desc