Select two.OwnerUserId, one.Score, Question = one.OwnerUs...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

Select 
two.OwnerUserId, one.Score, Question = one.OwnerUserId, Id

FROM 
(Select Id, OwnerUserId, Score
FROM Posts 
) as one

inner join 
(Select OwnerUserId, ParentId
FROM Posts
WHERE 
OwnerUserId in (4) 
AND YEAR(CreationDate) >2011) as two

on two.ParentId = one.Id
where one.OwnerUserId IS NOT NULL
order by 
two.OwnerUserId

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results