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
Turtlecrown
.
Toggle Highlighting
SQL
WITH ArticlesLackingSources AS ( SELECT cl_from AS article_id FROM categorylinks WHERE cl_to = 'All_articles_lacking_sources' ), -- Step 2: Get all categories these articles belong to ArticleCategories AS ( SELECT ac.article_id, cl2.cl_to AS category FROM ArticlesLackingSources ac JOIN categorylinks cl2 ON ac.article_id = cl2.cl_from ) -- Step 3: Aggregate and count articles by category SELECT c.cat_title AS category, COUNT(DISTINCT ac.article_id) AS article_count FROM ArticleCategories ac JOIN category c ON ac.category = c.cat_title GROUP BY c.cat_title ORDER BY article_count DESC;
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...