I once had a Quarry that would list all pages with the {{Dp}} template on it, ordered by number of incoming links. Unfortunately I lost the code/query. Right now I create it with a looped python script, but that runs for 15-16 hours to complete, where quarry would take about a minute. Can someone recreate it for me, as my tries failed all together until now.
Topic on Talk:Quarry
Hi,
https://quarry.wmflabs.org/query/28134 should do the job. It gives DAB pages with the number of receiving links in front, including those trough templates, unfortunately.
SELECT page_title, COUNT(pl_from) AS backlinks
FROM templatelinks
JOIN page ON page_id = tl_from
JOIN pagelinks ON pl_title = page_title AND pl_namespace = page_namespace
WHERE tl_title = 'Dp' AND tl_namespace = 10
GROUP BY tl_from
ORDER BY backlinks DESC;
The first one seems to give decent results, the second one has quite some false positives at first sight. Anyhow, thanks to both of you, I'm gonna work that out after my holidays!