SQL
AخA
USE wikidatawiki_p;
/*
SELECT entities.page_title, pl_title, rd_title, rev_timestamp
FROM pagelinks
JOIN page AS redirects ON redirects.page_title = pl_title AND redirects.page_namespace = pl_namespace
JOIN redirect ON rd_from = redirects.page_id
JOIN page AS entities ON entities.page_id = pl_from
JOIN revision ON redirects.page_latest = rev_id
WHERE pl_namespace = 0
AND pl_from_namespace IN (0, 120, 146)
AND rev_timestamp < DATE_ADD(NOW(), INTERVAL -7 DAY);
#ORDER BY rev_timestamp;
/*/
SELECT DISTINCT page_title, rev_timestamp FROM pagelinks
JOIN page ON pl_title = page_title AND pl_namespace = page_namespace
JOIN revision ON page_latest = rev_id
WHERE page_is_redirect = 1
AND page_namespace = 0
AND pl_from_namespace IN (0, 120)#, 146)
AND rev_timestamp < DATE_ADD(NOW(), INTERVAL -7 DAY)
ORDER BY rev_timestamp;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.