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
.
Miscounts in {{PAGESINCATEGORY}} for the categories linked from [[Template:CSD-categories]]. COUNT(page_id) is the expected result. COUNT(*) shows that the rows in the categorylinks table aren't being deleted when the corresponding rows in the page table are (the new bug). cat_pages+cat_subcats+cat_files shows the old bug where the counts stored in the category table aren't reliably updated, now exacerbated by the new bug. For [[WP:VPT#Problems with speedy deletion category counts]] circa 14 January 2022.
Toggle Highlighting
SQL
SELECT cl_to, COUNT(page_id), COUNT(*), cat_pages+cat_subcats+cat_files FROM categorylinks LEFT JOIN page ON page_id = cl_from LEFT JOIN category ON cat_title = cl_to WHERE cl_to IN (SELECT pl_title FROM pagelinks WHERE pl_namespace = 14 AND pl_from = (SELECT page_id FROM page WHERE page_namespace = 10 AND page_title='CSD-categories')) GROUP BY cl_to;
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...