tags

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 t.tagName, u.Location, count (*)
  from Posts p
  join Users u on p.OwnerUserId = u.Id and p.PostTypeId = 1
  join PostTags pt on p.Id = pt.postId
  join Tags t on pt.tagId = t.Id
  where u.Location in ('Lagos', 'Nigeria')
  group by t.tagName, u.Location
  having 
  (u.Location in ('Lagos') and count (*) > 15)
  or
  (u.Location in ('Nigeria') and count (*) > 10)
  order by t.tagName

Enter Parameters

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