;WITH qforuser AS ( SELECT coalesce(p.parentid, p.id) id ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

;WITH qforuser AS (
  SELECT coalesce(p.parentid, p.id) id
  from posts p
  where p.owneruserid = ##UserId##
),

eligableTags AS (
    --  There is some cutoff; this is best SWAG at moment
    SELECT      t.Id
    FROM        Tags t
    INNER JOIN  PostTags pt     ON t.Id         = pt.TagId
    INNER JOIN  qforuser q         ON q.Id         = pt.PostId
    -- GROUP BY    t.Id
    --HAVING      Count (q.ID) >= 200
)

select *
from qforuser

Enter Parameters

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