Q&A about the site for administrators, end users, developers and designers for Craft CMS
-- SELECT 'Absolute links to posts:', COUNT(*) FROM Posts -- WHERE (Body LIKE '%<a href="http://stackoverflow.com/questions/%' -- OR Body LIKE '%<a href="http://stackoverflow.com/[qa]/%') -- AND LastEditDate Between DateAdd("m", -6, getdate()) And DateAdd("m", -7, getdate()) -- UNION ALL SELECT 'Relative links to posts:', COUNT(*) FROM Posts WHERE (Body LIKE '%<a href="/questions/%' OR Body LIKE '%<a href="/[qa]/%') AND CreationDate BETWEEN DateAdd("m", -6, getdate()) And DateAdd("m", -7, getdate())