Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
XXN
.
Toggle Highlighting
SQL
USE rowiki_p; SELECT page_title, COUNT(tl_title) FROM page JOIN templatelinks ON tl_from = page_id and tl_from_namespace = 0 AND tl_namespace = 10 JOIN pagelinks ON pl_from = page_id AND page_namespace = 10 WHERE pl_title in (SELECT page_title FROM (SELECT * FROM page WHERE page_is_redirect = 1 AND page_namespace = 0) AS red JOIN (SELECT * FROM pagelinks WHERE pl_from_namespace = 10) AS pag ON pl_title = page_title AND pl_namespace = page_namespace JOIN redirect ON rd_from = page_id) GROUP BY page_title having COUNT(pl_title)>=10 ORDER BY COUNT(tl_title) DESC /* Most linked redirects in rowiki templates SELECT page_title, rd_title, COUNT(*) FROM (SELECT * FROM page WHERE page_is_redirect = 1 AND page_namespace = 0) AS red JOIN (SELECT * FROM pagelinks WHERE pl_from_namespace = 10) AS pag ON pl_title = page_title AND pl_namespace = page_namespace JOIN redirect ON rd_from = page_id GROUP BY page_title ORDER BY COUNT(*) DESC*/
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...