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
Kekavigi
.
Toggle Highlighting
SQL
WITH cte_math (page_id, page_title, priority) AS ( SELECT main.page_id, main.page_title, cl.cl_to #REPLACE(cl.cl_to,'-priority_mathematics_articles','') FROM page as talk INNER JOIN page AS main ON main.page_title = talk.page_title INNER JOIN categorylinks AS cl ON cl.cl_from = talk.page_id WHERE main.page_title NOT IN ( SELECT page_title FROM page INNER JOIN categorylinks AS cl ON cl.cl_from = page.page_id WHERE cl.cl_to IN ( 'FA-Class_biography_articles', 'FL-Class_biography_articles', 'FM-Class_biography_articles', 'GA-Class_biography_articles', 'B-Class_biography_articles', 'C-Class_biography_articles', 'Start-Class_biography_articles' 'Stub-Class_biography_articles', 'List-Class_biography_articles', 'Disambig-Class_biography_articles', 'Redirect-Class_biography_articles', 'Unassessed_biography_articles')) AND main.page_namespace = 0 AND main.page_is_redirect = 0 AND cl.cl_to IN ( 'Top-priority_mathematics_articles', 'High-priority_mathematics_articles', 'Mid-priority_mathematics_articles', 'Low-priority_mathematics_articles', 'NA-priority_mathematics_articles', 'Unknown-priority_mathematics_articles') ) SELECT #_from.page_title AS from_page, _to.page_title AS to_page, SUM(CASE WHEN _from.priority = 'Top-priority_mathematics_articles' THEN 1 ELSE 0 END) AS Top, SUM(CASE WHEN _from.priority = 'High-priority_mathematics_articles' THEN 1 ELSE 0 END) AS High, SUM(CASE WHEN _from.priority = 'Mid-priority_mathematics_articles' THEN 1 ELSE 0 END) AS Mid, SUM(CASE WHEN _from.priority = 'Low-priority_mathematics_articles' THEN 1 ELSE 0 END) AS Low, SUM(CASE WHEN _from.priority = 'NA-priority_mathematics_articles' OR _from.priority = 'Unknown--priority_mathematics_articles' THEN 1 ELSE 0 END) AS NA FROM cte_math AS _from INNER JOIN pagelinks AS pl ON _from.page_id = pl.pl_from INNER JOIN linktarget AS lt ON pl.pl_target_id = lt.lt_id INNER JOIN cte_math AS _to ON lt.lt_id = _to.page_id GROUP BY _to.page_title
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...