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
Gnoeee
.
Edit count of users in a category.
Toggle Highlighting
SQL
SELECT user.user_name, COUNT(revision.rev_id) AS contributions_last_year FROM user JOIN actor ON actor.actor_user = user.user_id JOIN revision ON revision.rev_actor = actor.actor_id WHERE user.user_name IN ( SELECT REPLACE(page_title, '_', ' ') AS user_name FROM categorylinks JOIN page ON page_id = cl_from LEFT JOIN actor AS actor_page ON actor_page.actor_name = page_title WHERE cl_to = 'User_ml' ) AND revision.rev_timestamp >= DATE_FORMAT(NOW() - INTERVAL 1 YEAR, '%Y%m%d%H%i%S') GROUP BY user.user_name HAVING contributions_last_year > 10 ORDER BY contributions_last_year DESC;
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...