Q&A for professional and amateur woodworkers
declare @tagId int; select @tagId = Id from Tags where TagName = 'java'; select top 1000 p.* from posts p join PostTags pt on pt.PostId = p.Id where ( p.PostTypeId = 1 and pt.TagId = @tagId ) order by p.CreationDate DESC