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
SET @avg_edits=(SELECT AVG(totaledits) AS avg_edit FROM (SELECT actor_id,actor_name,COUNT(r.rev_id) AS totaledits FROM revision r JOIN actor a ON r.rev_actor=a.actor_id WHERE r.rev_timestamp BETWEEN DATE_FORMAT(CURDATE() - INTERVAL 2 MONTH,'%Y%m01') AND DATE_FORMAT(CURDATE(),'%Y%m%d') GROUP BY actor_id) AS new); SELECT a.actor_name, COUNT(r.rev_id) AS total_edits ,ROUND(((COUNT(r.rev_id)-@avg_edits)/@avg_edits)*100) AS percentage_above_avg FROM revision r JOIN actor a ON r.rev_actor = a.actor_id WHERE r.rev_timestamp BETWEEN DATE_FORMAT(CURDATE() - INTERVAL 2 MONTH, '%Y%m01') AND DATE_FORMAT(CURDATE(), '%Y%m%d') GROUP BY actor_id ORDER BY total_editsĀ DESC 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...