Q&A about the site for serious players and enthusiasts of poker
declare @TagString nvarchar(25) = ##tagName:string## select TOP ##ResultSize## ViewCount, Id AS [Post Link] from Posts where Id in ( select PostId from PostTags where TagId = ( select Id from Tags where TagName IN (@TagString) ) ) AND CreationDate > GETDATE() - ##Days## AND CreationDate < GETDATE() - ##Olddays## Group by ViewCount, Id ORDER by ViewCount DESC