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
.
For June 20 of each year, count: * The total number of afd pages transcluded onto [[Wikipedia:Articles for deletion/Log/{{{year}}}_June_20]] * The total number of different users who've edited at least one of those transcluded afd pages * The average number of different users who've edited each of those transcluded afd pages. Excludes bots (that have a bot flag).
Toggle Highlighting
SQL
WITH transcluded AS (SELECT page_title AS dailylog_title, tl_title AS afd_title, (SELECT COUNT(DISTINCT rev_actor) FROM revision JOIN page AS afd_page ON page_id = rev_page WHERE page_namespace = 4 AND page_title = tl_title) AS users_per_afd FROM templatelinks JOIN page ON page_id = tl_from WHERE tl_namespace = 4 AND (tl_title LIKE 'Articles\_for\_deletion/%' OR tl_title LIKE 'Votes\_for\_deletion/%') AND page_namespace = 4 AND page_title LIKE 'Articles\_for\_deletion/Log/20__\_June\_20' AND tl_title != page_title -- don't include the self-transclusion that some template tricks use ) SELECT MID(dailylog_title, 27, 4) AS 'afd year', COUNT(DISTINCT rev_actor) AS 'total different users editing any afd', COUNT(DISTINCT afd_title) AS 'total afds transcluded to log page', AVG(users_per_afd) AS 'average number of different users editing each afd' FROM page AS afd_page JOIN transcluded ON afd_page.page_namespace = 4 AND afd_page.page_title = transcluded.afd_title JOIN revision ON rev_page = afd_page.page_id GROUP BY `afd year`;
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...