declare @yr as int = ##year:int## select as [Post L...


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- year: use a negative number for how many years back you want to query
declare @yr as int = ##year:int##

select as [Post Link]
from posts p
where body like '%```%'
and creationdate between dateadd(yy, @yr-1, getdate()) and dateadd(yy, @yr , getdate()) 
and not exists ( select 1
                 from  posttags pt 
                 inner join tags t on = pt.tagid
                 where pt.postid = coalesce(p.parentid,
                 and t.tagname in ('r', 'rmarkdown'))

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results