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
Nettrom
.
Are all redirects pointing to pages in WPMED also in WPMED?
Toggle Highlighting
SQL
USE enwiki_p; SELECT count(*) AS num_redirects_wpmed FROM page p JOIN pagelinks pl ON (p.page_namespace=pl.pl_namespace AND p.page_title=pl.pl_title) JOIN page lp ON (lp.page_id=pl.pl_from) JOIN page tp ON (lp.page_title=tp.page_title AND tp.page_namespace=1) JOIN categorylinks cl ON (tp.page_id=cl.cl_from) WHERE pl.pl_from_namespace=0 AND lp.page_is_redirect=1 AND cl.cl_to = "All_WikiProject_Medicine_articles"; SELECT count(*) AS num_redirects FROM page p JOIN pagelinks pl ON (p.page_namespace=pl.pl_namespace AND p.page_title=pl.pl_title) JOIN page lp ON (lp.page_id=pl.pl_from) JOIN page tp ON (lp.page_title=tp.page_title AND tp.page_namespace=1) WHERE pl.pl_from_namespace=0 AND lp.page_is_redirect=1;
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...