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
Uhai
.
Per [[WP:RAQ]]: [[Special:Permalink/1186751253##Stub-class_articles_not_tagged_with_a_stub_template]] - November 25, 2023 First result set returns articles who are not tagged as stubs but whose talk pages are members of one or more stub-class categories. Second result set returns articles who are tagged as stubs but whose talk pages are not members of any stub-class category. Articles with no talk pages will not appear in the results.
Toggle Highlighting
SQL
WITH RECURSIVE stubclass AS ( SELECT cl.cl_from FROM categorylinks cl WHERE cl.cl_to = 'Stub-Class_articles' UNION SELECT cl.cl_from FROM categorylinks cl INNER JOIN page p ON cl.cl_to = p.page_title AND p.page_namespace = 14 INNER JOIN stubclass sc ON sc.cl_from = p.page_id ) -- Non-stub articles with at least one stub-class on talk page SELECT CONCAT('https://en.wikipedia.org/wiki/', p.page_title) FROM page p INNER JOIN page p_talk ON p.page_title = p_talk.page_title AND p_talk.page_namespace = 1 WHERE p.page_namespace = 0 AND p.page_id NOT IN (SELECT cl.cl_from FROM categorylinks cl WHERE cl.cl_to = 'All_stub_articles') AND p_talk.page_id IN (SELECT sc.cl_from FROM stubclass sc); -- Stub articles with no stub-class on talk page SELECT CONCAT('https://en.wikipedia.org/wiki/', p.page_title) FROM page p INNER JOIN page p_talk ON p.page_title = p_talk.page_title AND p_talk.page_namespace = 1 WHERE p.page_namespace = 0 AND p.page_id IN (SELECT cl.cl_from FROM categorylinks cl WHERE cl.cl_to = 'All_stub_articles') AND p_talk.page_id NOT IN (SELECT sc.cl_from FROM stubclass sc);
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...