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
.
The number of deletions in each month since the deletion log began in December 2004, with an attempt to classify the type of deletion based on the log comment. Deletion reasons are non-overlapping, and earlier ones take precedence. For example, a log comment of '[[WP:CSD#G4|G4]]: Recreation of a page that was [[WP:DEL|deleted]] per a [[WP:XFD|deletion discussion]]: [[Wikipedia:Articles for deletion/Example]]' would be counted as 'Other speedy' and not as 'AFD'; and one of 'Multiple reasons: speedy deletion criteria [[WP:U5|U5]], [[WP:G11|G11]]' would be 'G11' and not as 'Other speedy'. 'redirect overwrites' is classified using the separate log_actions of 'delete_redir' and 'delete_redir2' instead of the log comment, so it's only accurate to when they were introduced in December 2016. For [[WP:RAQ#number of deletions]] circa 2023 Dec 3.
Toggle Highlighting
SQL
SELECT yyyymm, SUM(reason = 'redir') AS 'redirect overwrites', SUM(reason = 'a7+g11') AS 'A7 and G11', SUM(reason = 'a7') AS 'A7', SUM(reason = 'g11') AS 'G11', SUM(reason = 'speedy') AS 'Other speedy', SUM(reason = 'afd') AS 'AFD', SUM(reason = 'cfd') AS 'CFD', SUM(reason = 'rfd') AS 'RFD', SUM(reason = 'tfd') AS 'TFD', SUM(reason = 'ffd') AS 'FFD', SUM(reason = 'mfd') AS 'MFD', SUM(reason = 'prod') AS 'prod', SUM(reason = 'unparsed') AS 'unparsed', COUNT(*) AS 'total' FROM ( -- this irritating subquery mostly so we can ensure no deletion is classified as more than one reason, -- without having to repeat each previous condition SELECT CONCAT(LEFT(log_timestamp, 4), '-', SUBSTR(log_timestamp, 5, 2)) AS 'yyyymm', CASE WHEN log_action != 'delete' THEN 'redir' WHEN comment_text RLIKE '(?i)(^|\\[\\[)((WP|Wikipedia):)?(CSD[#_ ]?)?[GARFICUT][_ ]?1?[0-9]\\b' THEN CASE WHEN comment_text RLIKE '(?i)\\ba7\\b' AND comment_text RLIKE '(?i)\\bg11\\b' THEN 'a7+g11' WHEN comment_text RLIKE '(?i)\\ba7\\b' THEN 'a7' WHEN comment_text RLIKE '(?i)\\bg11\\b' THEN 'g11' ELSE 'speedy' END WHEN comment_text RLIKE '(?i)(\\[\\[(WP|Wikipedia):(Votes|Articles)[_ ]for[_ ]deletion/|\\b[av]fd\\b)' THEN 'afd' WHEN comment_text RLIKE '(?i)(\\[\\[(WP|Wikipedia):Categories[_ ]for[_ ](deletion|discussion)/|\\bcfd\\b)' THEN 'cfd' WHEN comment_text RLIKE '(?i)(\\[\\[(WP|Wikipedia):Redirects[_ ]for[_ ](deletion|discussion)/|\\brfd\\b)' THEN 'rfd' WHEN comment_text RLIKE '(?i)(\\[\\[(WP|Wikipedia):Templates[_ ]for[_ ](deletion|discussion)/|\\btfd\\b)' THEN 'tfd' WHEN comment_text RLIKE '(?i)(\\[\\[(WP|Wikipedia):(Files|Images)[_ ]for[_ ](deletion|discussion)/|\\b[fi]fd\\b)' THEN 'ffd' WHEN comment_text RLIKE '(?i)(\\[\\[(WP|Wikipedia):Miscellany[_ ]for[_ ]deletion/|\\bmfd\\b)' THEN 'mfd' WHEN comment_text RLIKE '(?i)(\\bprod\\b|proposed deletion)' THEN 'prod' ELSE 'unparsed' END AS reason, comment_text FROM logging LEFT JOIN comment_logging ON comment_id = log_comment_id WHERE log_type = 'delete' AND log_action IN ('delete', 'delete_redir', 'delete_redir2') ) sq GROUP BY yyyymm;
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...