Fork of المستخدمون حسب أيام تواجدهم خلال العام fixed by Mr. Ibrahem
This query is marked as a draft This query has been published by Nehaoua.

SQL

AخA
 
use arwiki_p;
select actor_name as "اسم المستخدم", count(*) as "عدد الأيام" from(
select actor_name, count(*)
from revision, actor#,user#,user_groups
where rev_timestamp like "2018%"
and actor_id = rev_actor
#and actor_name = user_name 
#and ug_user = user_id
#and ug_group like "editor"
#and actor_name in (select user_name  from user where user_name = actor_name
  #                    and user_id in (select ug_user from user_groups  where ug_user = user_id and ug_group like "editor"))
group by actor_name, (DAY(rev_timestamp)), (MONTH(rev_timestamp))) as x
group by actor_name
order by count(*) desc
limit 100;
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...