Fork of Top editors in Module namespace arwiki by حبيشان
This query is marked as a draft This query has been published by حبيشان.

SQL

x
 
USE arwiki_p;
select 'sysop' as usergroup, count(rev_id) as c
from revision 
JOIN actor ON actor_id = rev_actor
JOIN page ON rev_page = page_id
WHERE page_namespace = 828 
and  (page_title not  like '%شرح')
and actor_user not in (select ug_user from user_groups as ug2 where ug_group = "bot")
and actor_user not in (select ufg_user from user_former_groups as ufg2 where ufg_group = "bot")
and actor_user in (select ufg_user from user_former_groups as ufg2 where ufg_group = "sysop")
-- and rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -365 DAY), "%Y%m%d%H%i%s")
group by usergroup,page_namespace
UNION 
select 'non-sysop' as usergroup, count(rev_id) as c
from revision 
JOIN actor ON actor_id = rev_actor
JOIN page ON rev_page = page_id
WHERE page_namespace = 828 
and  (page_title not  like '%شرح')
and actor_user not in (select ug_user from user_groups as ug2 where ug_group = "bot")
and actor_user not in (select ufg_user from user_former_groups as ufg2 where ufg_group = "bot")
and actor_user not in (select ufg_user from user_former_groups as ufg2 where ufg_group = "sysop")
-- and rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -365 DAY), "%Y%m%d%H%i%s")
group by usergroup,page_namespace
order by 2 desc
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.

Checking query status...