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
Cryptic
.
Differences between the actual number and the values produced by {{PAGESINCATEGORY:cat}} for each category linked from a given page, here [[Template:CSD-categories]].
Toggle Highlighting
SQL
SELECT cat_title, cl_type, COUNT(*) AS 'actual', CASE cl_type WHEN 'page' THEN cat_pages - cat_subcats - cat_files WHEN 'subcat' THEN cat_subcats WHEN 'file' THEN cat_files ELSE cl_type END AS 'reported' FROM categorylinks JOIN category ON cl_to = cat_title WHERE cl_to IN (SELECT pl_title FROM pagelinks JOIN page ON pl_from = page_id WHERE pl_namespace = 14 AND page_namespace = 10 AND page_title = 'CSD-categories') GROUP BY cl_to, cl_type HAVING actual != reported;
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...