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
Bdijkstra
.
Toggle Highlighting
SQL
/*SELECT page_title, page_len FROM page tpl WHERE page_namespace=10 AND page_is_redirect=0 AND page_title REGEXP '^Navigatie_' AND EXISTS (SELECT * FROM pagelinks WHERE pl_from=page_id AND pl_namespace=0) AND NOT EXISTS (SELECT * FROM pagelinks, page tgt WHERE pl_from=page_id AND pl_title!=tpl.page_title AND pl_namespace=tgt.page_namespace AND pl_title=tgt.page_title) LIMIT 1000*/ SELECT page_title, page_len, (SELECT COUNT(*) FROM pagelinks, page tgt WHERE pl_from=tpl.page_id AND pl_title!=tpl.page_title AND pl_namespace=tgt.page_namespace AND pl_title=tgt.page_title) AS blue, (SELECT COUNT(*) FROM pagelinks WHERE pl_from=tpl.page_id AND NOT EXISTS ( SELECT * FROM page tgt WHERE pl_title!=tpl.page_title AND pl_namespace=tgt.page_namespace AND pl_title=tgt.page_title)) AS red FROM page tpl WHERE page_namespace=10 AND page_is_redirect=0 AND page_title REGEXP '^Navigatie_' AND EXISTS (SELECT * FROM pagelinks WHERE pl_from=page_id AND pl_namespace=0) HAVING blue <= 2 AND red > 0 ORDER BY red DESC, page_title LIMIT 1000
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...