Creativity_Variable 1_Post

1

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 
OwnerUserId, Answers_Count = COUNT(number.Score), 
Total_badges = COUNT(Decide.Id) 
FROM 
    (SELECT OwnerUserId, ParentId, Score
  FROM Posts
  WHERE 
  PostTypeId = 2
  AND Score >1
  AND YEAR(CreationDate) <2011
  AND OwnerUserId IS NOT NULL
  ) as number
  
inner join 
(SELECT Id, UserId
From Badges
WHERE YEAR (Date)<2011) as Decide

on number.OwnerUserId = Decide.UserId

GROUP BY OwnerUserId
HAVING OwnerUserId %2  = 0 AND COUNT(number.Score) > 4 
ORDER BY OwnerUserId

Enter Parameters

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