datediff

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sitecore Meta

Q&A about the site for developers and end users of the Sitecore CMS and multichannel marketing software

SELECT TagId, TagName, row_number() OVER(ORDER BY cnt DESC) AS a
FROM
(
SELECT pt.TagId, t.TagName, COUNT(*) AS cnt
FROM PostTags pt
JOIN Posts p ON pt.PostId = p.Id
JOIN Tags t ON pt.TagId = t.Id
WHERE datepart(year, p.CreationDate) = 2017
GROUP BY pt.TagId, t.TagName
) temp

Enter Parameters

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