Q&A about the site for gardeners and landscapers
-- Comparing the number of absolute and relative links to posts. -- Sampling from an arbitrary time frame because sampling all time times out. 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(mm, -12, getdate()) And DateAdd(mm, -9, 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(mm, -12, getdate()) And DateAdd(mm, -9, getdate())