Fork of
Editor counts at village pumps
by BilledMammal
This query is marked as a draft
This query has been published
by Cryptic.
SQL
AخA
SELECT CASE
WHEN user_editcount >= 500 THEN '>= 500'
WHEN user_editcount < 10 THEN user_editcount
ELSE CONCAT(FLOOR(user_editcount / 10), '0-', FLOOR(user_editcount / 10), '9')
END AS editcount,
COUNT(DISTINCT user_id)
FROM revision
JOIN page ON page_id = rev_page
JOIN actor_revision ON actor_id = rev_actor
JOIN user ON actor_user = user_id
WHERE page_namespace IN (4, 5)
AND page_title LIKE 'Village\_pump%'
AND (page_title NOT LIKE '%rchive%'
OR page_title = 'Village_pump_archive_2004-09-26')
GROUP BY (CASE WHEN user_editcount >= 500 THEN '>= 500'
WHEN user_editcount < 10 THEN user_editcount
ELSE CONCAT(FLOOR(user_editcount / 10), '0') END)
ORDER BY user_editcount ASC;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.