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

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

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

select p.id 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 t.id = pt.tagid
                 where pt.postid = coalesce(p.parentid, p.id)
                 and t.tagname in ('r', 'rmarkdown'))

Enter Parameters

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