Does a user have any flagged posts?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

select
 p.Id as [Post Link],
 (
  select count(v.Id) from Votes v
  where v.PostId = p.Id and (v.VoteTypeId = 4 or v.VoteTypeId = 12 or v.VoteTypeId = 13)
 ) as Flags
from Posts p
where p.OwnerUserId = ##UserId##

Enter Parameters

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