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
Josve05a
.
Toggle Highlighting
SQL
SELECT p.page_namespace, p.page_title FROM page p LEFT JOIN pagelinks pl ON p.page_id = pl.pl_from LEFT JOIN templatelinks tl ON p.page_id = tl.tl_from WHERE p.page_namespace = 0 -- Limit to the main namespace (ns0) AND pl.pl_from IS NULL -- Check if there are no incoming links AND tl.tl_namespace = 10 -- Template namespace AND tl.tl_title = 'Orphan' -- Check for the Orphan template AND p.page_is_redirect = 0 -- Exclude redirects AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE cl_from = p.page_id AND cl_to = 'All_orphaned_articles' -- Exclude articles in the Orphan category ) AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE cl_from = p.page_id AND cl_to IN ('All_set_index_articles', 'All_disambiguation_pages') -- Exclude set index and disambiguation pages ) LIMIT 100;
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...