Show top 2000 posts by ViewCount in a tag
Q&A for designers and users of artificial or invented languages, consciously developed instead of having developed naturally
DECLARE @tag0 nvarchar(25) = ##tag0:string?jquery## SELECT top 5000 p.id as [Post Link], p.title, p.ViewCount, p.CreationDate, p.Tags FROM Tags t JOIN PostTags pt ON pt.TagId = t.Id JOIN Posts as p ON p.Id = pt.PostId WHERE TagName = @tag0 ORDER BY p.ViewCount/(1+DATEDIFF(week, p.CreationDate, GETDATE())) DESC