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
Estimatio
.
Toggle Highlighting
SQL
-- Find all pages linking to non-existent pages and retrieve titles SELECT p1.page_title AS linking_page, COUNT(*) AS link_count FROM pagelinks pl JOIN page p1 ON pl.pl_from = p1.page_id -- Join to get the source page title LEFT JOIN page p2 ON pl.pl_target_id = p2.page_id WHERE p2.page_id IS NULL -- The target page does not exist AND pl.pl_target_id IS NOT NULL -- Ensure the target ID is valid AND pl.pl_target_namespace = 0 -- Only consider links in the main namespace AND pl.pl_namespace = 0 -- Only consider links in the main namespace AND p1.page_title LIKE 'Aathur%' -- Filter source page titles starting with "Aathur" GROUP BY p1.page_title HAVING link_count > 0 ORDER BY link_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...