SQL
AخA
USE cswiki_p;
SELECT log_user_text, COUNT(*)
FROM (SELECT * FROM logging WHERE log_type = "patrol" AND log_timestamp > DATE_ADD(NOW(), INTERVAL -1 MONTH)) AS patrols
JOIN (SELECT * FROM revision WHERE rev_parent_id = 0) AS new
ON rev_page = log_page AND log_user <> rev_user
GROUP BY log_user_text
ORDER BY COUNT(*) DESC, log_user_text;
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.