Order questions by links for selected user

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

declare @user_id int = ##UserId##

select
  pl.RelatedPostId as [Post Link],
  count(pl.RelatedPostId) as [Number of Links],
  p.Title, p.Score, p.ViewCount, p.AnswerCount
from PostLinks pl
join Posts p on p.Id = pl.RelatedPostId and p.OwnerUserId = @user_id
group by pl.RelatedPostId, p.ViewCount, p.Score, p.AnswerCount, p.Title
order by [Number of Links] desc

Enter Parameters

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