select a.OwnerUserId as Id, sum(case when a.Score = 0 the...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

select a.OwnerUserId as Id, 
    sum(case when a.Score = 0 then 0 else 1 end) as [Non Zero Score Answers],  
    sum(case when a.Score = 0 then 1 else 0 end) as [Zero Score Answers]
  from Posts q
  join Posts a on a.Id = q.AcceptedAnswerId 
  where a.CommunityOwnedDate is null and a.OwnerUserId is not null
   and a.OwnerUserId <> isnull(q.OwnerUserId,-1)
   and a.CreationDate < getdate()
   and a.OwnerUserId = 1048330
  group by a.OwnerUserId
  having sum(case when a.Score = 0 then 1 else 0 end) > 5

Enter Parameters

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