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
CMyrick-WMF
.
example using acewiki
Toggle Highlighting
SQL
WITH base_table AS ( SELECT DISTINCT rev_id, rev_actor, rev_timestamp, rev_len, rev_parent_id, page_namespace, page_id, actor_id, REGEXP_SUBSTR(page_title, 'Ws/hi') AS prefix, ug_group FROM revision rev JOIN page p ON rev.rev_page = p.page_id JOIN actor a ON rev.rev_actor = a.actor_id JOIN user u ON a.actor_user = u.user_id LEFT JOIN user_groups ug ON ug.ug_user = u.user_id LEFT OUTER JOIN recentchanges rc ON rev.rev_id = rc.rc_this_oldid WHERE user_name IS NOT NULL AND (ug_group NOT IN ("bot") OR ug_group IS NULL) HAVING prefix <> ''), primary_metrics AS ( SELECT prefix, page_namespace, COUNT(DISTINCT rev_id) AS edit_count, COUNT(DISTINCT actor_id) AS actor_count, COUNT(DISTINCT page_id) AS pages_count FROM base_table GROUP BY prefix), month_year AS ( SELECT *, YEAR(rev_timestamp) AS year, MONTH(rev_timestamp) AS month FROM base_table), monthly_grouping_before_grad AS ( SELECT prefix, month, year, COUNT(DISTINCT actor_id) AS editors_monthly_before_grad FROM month_year WHERE month > 9 AND year > 2019 GROUP BY prefix, month, year) SELECT * FROM monthly_grouping_before_grad LIMIT 5
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...