Last active
August 29, 2015 14:05
-
-
Save Ironholds/04d32b2018df09962f03 to your computer and use it in GitHub Desktop.
bot-excludor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT INTO TABLE blahblahblah rev_user_text, page_title, LEFT(rev_timestamp,6) AS ts COUNT(*) as edits FROM revision | |
| JOIN page ON page_id = rev_page | |
| JOIN user_groups ON ug_user = rev_user | |
| WHERE page_namespace = 3 | |
| AND page_is_redirect = 0 | |
| AND rev_user NOT IN (SELECT user_id FROM user INNER JOIN user_groups ON user_id = ug_user AND ug_group = 'bot') | |
| AND page_title NOT LIKE '%/%' | |
| GROUP BY LEFT(rev_timestamp,6), rev_user_text, page_title | |
| ORDER BY COUNT(*) DESC; | |
| SELECT rev_user_text, ts, sum(edits) | |
| FROM temporarytablethingy | |
| INNER JOIN temporarytablethingy | |
| ON t1.rev_user_text = t2.page_title | |
| WHERE t2.rev_user_text != t1.rev_user_text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment