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
Yesh0305
.
Toggle Highlighting
SQL
WITH RollingEdits AS ( SELECT user_id, user_name, SUM(user_editcount) AS Total_Edits FROM user WHERE edit_date BETWEEN DATE_SUB(DATE_FORMAT(NOW(), '%Y-%m-01'), INTERVAL 2 MONTH) AND LAST_DAY(DATE_SUB(DATE_FORMAT(NOW(), '%Y-%m-01'), INTERVAL 0 MONTH)) GROUP BY user_id ), RankedEdits AS ( SELECT user_id, user_name, Total_Edits, ROW_NUMBER() OVER (PARTITION BY wiki_language ORDER BY Total_Edits DESC) AS rank FROM RollingEdits ) SELECT user_id, user_name, Total_Edits FROM RankedEdits WHERE rank <= 5 ORDER BY Total_Edits 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...