Fork of Most wanted articles: ns0→ns0 redlinks only by Netha Hussain
This query is marked as a draft This query has been published by DeemDeem52.

SQL

x
 
-- Current code by DeemDeem52
-- Issue: this code only seems to find articles that actually exist
SELECT lt.lt_title AS Target, COUNT(IF(page_title IS NULL, 1, NULL)) AS LinkCount
FROM pagelinks pl
INNER JOIN linktarget lt ON pl.pl_target_id = lt.lt_id
LEFT JOIN page ON page_namespace = 0 AND page_title = lt.lt_title
WHERE pl_from_namespace = 0 AND lt.lt_namespace = 0 AND lt.lt_title >= 'Aathur'
GROUP BY Target
LIMIT 15;
/* 
-- Updated code by Netha Hussain
SELECT pl_title AS Target, COUNT(IF(page_title IS NULL, 1, NULL)) AS LinkCount
FROM pagelinks
LEFT JOIN page ON page_namespace = 0 AND page_title = pl_title
WHERE pl_from_namespace = 0 AND pl_namespace = 0 AND pl_title >= 'L' AND pl_title < 'M'
GROUP BY Target
HAVING LinkCount > 500
ORDER BY LinkCount DESC;
*/
/*
-- Original code by Certes
SELECT pl_title Target, SUM(page_title IS NULL) LinkCount
FROM pagelinks
LEFT JOIN page ON page_namespace=0 AND page_title=pl_title
WHERE pl_from_namespace=0 AND pl_namespace=0 AND pl_title < "B"
GROUP BY Target
HAVING LinkCount>500
ORDER BY LinkCount DESC
*/
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.

Checking query status...