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
WelpThatWorked
.
Articles which are linked to from a navbox template, but do not transclude said template. Generates some false positives, such as Coord/speedtest, which I haven't found a workaround for.
Toggle Highlighting
SQL
# select page titles and template titles SELECT page_title AS "Page Name", (SELECT page_title FROM page WHERE page_id = pl_from) AS "Nav Template" FROM page JOIN pagelinks ON pl_title = page_title # with links incoming from templatespace WHERE pl_from_namespace = 10 # and is in article space AND page_namespace = 0 # and the incoming template is /probably/ an infobox template AND pl_from IN (SELECT tl_from FROM templatelinks WHERE tl_title = "Navbox" AND tl_from = pl_from) # and ensure the template isn't something transcluded into another template AND NOT EXISTS (SELECT tl_from FROM templatelinks WHERE tl_title = (SELECT page_title FROM page WHERE page_id = pl_from) AND tl_from_namespace = 10) # check that the original page can "see" the Navbox, to work around <noinclude>ed stuff like /doc pages including navboxes #AND page_id IN (SELECT tl_from FROM templatelinks WHERE tl_title = "Navbox" AND tl_from = page_id) # and the page doesn't transclude the template AND (SELECT page_title FROM page WHERE page_id = pl_from) NOT IN (SELECT tl_title FROM templatelinks WHERE tl_from = page_id) # and not a redirect AND page_is_redirect = 0 LIMIT 0; SELECT tl_from FROM templatelinks WHERE tl_title = "Navbox" AND tl_from_namespace = 10 LIMIT 50; #SELECT tl_from FROM templatelinks WHERE tl_title = (SELECT page_title FROM page WHERE page_id = (SELECT tl_from FROM templatelinks WHERE tl_title = "Navbox" AND tl_from_namespace = 10)) AND tl_from_namespace = 10 LIMIT 50;
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...