Fork of zhwiki: pages contain redirect from wp to wpj by Xiplus
This query is marked as a draft This query has been published by Xiplus.

SQL

AخA
 
USE zhwiki_p;
SELECT pl_from, COUNT(*) AS `cnt`
FROM pagelinks
LEFT JOIN (
  SELECT * FROM redirect
  WHERE rd_namespace = 102
) rd ON pl_namespace = 4 AND pl_title = rd_title
LEFT JOIN page ON rd_from = page_id
WHERE page_namespace = 4 AND rd_title IS NOT NULL
GROUP BY pl_from
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...