find similar tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフローMeta

プログラマーと熱狂的なプログラマーのためのサイトに関する質問と回答

-- How many upvotes do I have for each tag?
-- how long before I get tag badges?

--DECLARE @Tag VARCHAR = ##Tag##

with postids as (
  SELECT PostId
  FROM Tags
  INNER JOIN PostTags on Tags.Id=PostTags.TagId
  AND Tags.TagName='css'
)


SELECT TagName, count(*) as cnt
FROM Tags
INNER JOIN PostTags on Tags.Id=PostTags.TagId
WHERE PostTags.PostId in (SELECT PostId from postids)
and TagName<>'css'
GROUP BY TagName
ORDER BY cnt DESC

Enter Parameters

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