Tag wikis with referral links

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 DISTINCT
  Tags.Id,
  Tags.TagName,
  'site://tags/' + Tags.Tagname + '/info|Url' AS Url,
  len(Posts.Body)
FROM Tags
LEFT JOIN Posts ON Posts.Id = Tags.WikiPostId OR Posts.Id = Tags.ExcerptPostId
WHERE
  (
  LOWER(Posts.Body) LIKE '%stackoverflow.com/[aq]/___/[1-9]%'
  OR
  LOWER(Posts.Body) LIKE '%stackoverflow.com/[aq]/____/[1-9]%'
  OR
  LOWER(Posts.Body) LIKE '%stackoverflow.com/[aq]/_____/[1-9]%'
  OR
  LOWER(Posts.Body) LIKE '%stackoverflow.com/[aq]/______/[1-9]%'
  OR
  LOWER(Posts.Body) LIKE '%stackoverflow.com/[aq]/_______/[1-9]%'
  OR
  LOWER(Posts.Body) LIKE '%stackoverflow.com/[aq]/________/[1-9]%'
  )
ORDER BY Tags.Id

Enter Parameters

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