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
Huji
.
Toggle Highlighting
SQL
use fawiki_p; SELECT DISTINCT rev_user_text, COUNT(*) cnt, CASE WHEN ufg_group IS NULL THEN '' ELSE '{{خیر|بله}}' END AS lostautopatrol FROM revision JOIN actor ON rev_actor = actor_id LEFT JOIN user_former_groups ON actor_user = ufg_user AND ufg_group IN ('autopatrolled', 'autopatrol') LEFT JOIN page ON rev_page = page_id WHERE rev_parent_id = 0 AND page_is_redirect = 0 AND page_namespace = 0 AND rev_timestamp > CASE WHEN MONTH(CURDATE()) = 1 THEN CONCAT( YEAR(CURDATE()) - 1, '12', LPAD(DAY(CURDATE()), 2, 0), '000000' ) ELSE CONCAT( YEAR(CURDATE()), LPAD(MONTH(CURDATE()) - 1, 2, 0), LPAD(DAY(CURDATE()), 2, 0), '000000' ) END AND actor_user NOT IN ( SELECT ug_user FROM user_groups WHERE ug_group IN ('autopatrolled', 'sysop', 'bot') ) AND actor_user <> 0 /* anonymous users */ AND actor_user <> 374638 /* پیام به کاربر جدید */ GROUP BY actor_name, ufg_group HAVING cnt > 20 ORDER BY cnt 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...