SSE Expertise

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

SELECT pq.id, pq.parent_id, pq.owner_user_id, REPLACE(value, '<', '') as tag, pq.Score as score FROM

  (
    SELECT
      p.Id as id,
      p.ParentId as parent_id,
      p.OwnerUserId as owner_user_id,
      p.Tags as tags,
      p.Score as score
    FROM
      posts p
    WHERE
      p.ParentId IS NULL

    UNION ALL

    SELECT
      pa.Id as id,
      pa.ParentId as parent_id,
      pa.OwnerUserId as owner_user_id,
      pq.Tags,
      pa.Score
    FROM
      posts as pa
    LEFT JOIN posts pq on pa.ParentId = pq.Id
    WHERE
      pa.ParentId IS NOT NULL
  )  as pq
CROSS APPLY STRING_SPLIT(pq.Tags, '>')
WHERE value <> '' AND id >= ##minid## AND id < ##maxid##
ORDER BY id

Enter Parameters

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