Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Creator and usergroups for pages linked from a given page
by
Cryptic
This query is marked as a draft
This query has been published
by
Theredproject
.
Creators and their usergroups (if administrator and/or autoreviewer) of every page linked from [[User:Uanfala/dab/missing-new-articles01]]. For [[w:en:WP:VPT#Fetch article creators from a list of articles]] circa 24 Feb 2019. Gratuitous useless technobabble: finding the first revision of a given page with this method - revisions with no parent - is fast but not 100% reliable; it'll get false positives on a page that's been history merged and false negatives on a page that's been history split, and even more rarely from other weird situations. Specifically looking for the earliest revision, as in query 19060 (the r2.rev_id subquery) is slower but more reliable.
Toggle Highlighting
SQL
SELECT CONCAT('[[',CASE p2.page_namespace WHEN -2 THEN 'Media:' WHEN -1 THEN 'Special:' WHEN 0 THEN ':' WHEN 1 THEN 'Talk:' WHEN 2 THEN 'User:' WHEN 4 THEN 'Wikipedia:' WHEN 5 THEN 'Wikipedia talk:' WHEN 6 THEN ':File:' WHEN 7 THEN 'File talk:' WHEN 8 THEN 'MediaWiki:' WHEN 9 THEN 'MediaWiki talk:' WHEN 10 THEN 'Template:' WHEN 11 THEN 'Template talk:' WHEN 12 THEN 'Help:' WHEN 13 THEN 'Help talk:' WHEN 14 THEN ':Category:' WHEN 15 THEN 'Category talk:' WHEN 100 THEN 'Portal:' WHEN 101 THEN 'Portal talk:' WHEN 108 THEN 'Book:' WHEN 109 THEN 'Book talk:' WHEN 118 THEN 'Draft:' WHEN 119 THEN 'Draft talk:' WHEN 710 THEN 'TimedText:' WHEN 711 THEN 'TimedText talk:' WHEN 828 THEN 'Module:' WHEN 829 THEN 'Module talk:' WHEN 2300 THEN 'Gadget:' WHEN 2301 THEN 'Gadget talk:' WHEN 2302 THEN 'Gadget definition:' WHEN 2303 THEN 'Gadget definition talk:' ELSE CONCAT('{{ns:', p2.page_namespace, '}}:') END,p2.page_title,']]') AS pagename, CASE rev_actor WHEN 0 THEN rev_actor ELSE user_name END AS creator, ug_group, ug_expiry FROM pagelinks JOIN page p1 ON p1.page_id = pl_from JOIN page p2 ON p2.page_namespace = pl_namespace AND p2.page_title = pl_title LEFT JOIN revision ON rev_page = p2.page_id LEFT JOIN user ON user_id = rev_actor LEFT JOIN user_groups ON ug_user = rev_actor AND ug_group IN ('sysop', 'autoreviewer') -- remove this line to show all groups WHERE p1.page_namespace = 2 -- user namespace #AND p1.page_title = 'Theredproject/sandbox/scratchbox' #AND p1.page_title = 'Theredproject/sandbox/whitneylist' #AND p1.page_title = 'User:Theredproject/sandbox/Deletion_Workshop' #AND p1.page_title = 'User:Theredproject/sandbox/Deletion-Workshop' AND p1.page_title = 'Uanfala/dab/missing-new-articles01' AND rev_parent_id = 0;
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...