Absolute and relative links to posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ukrainian Language Meta

Q&A about the site for linguists, teachers and students of the Ukrainian language

-- 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())

Enter Parameters

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