This query is marked as a draft This query has been published by Nehaoua.

SQL

x
 
/* أكثر الإداريين حذفًا*/
use arwiki_p;
SET @start_date = '20221201000000';
SET @end_date = '20230101000000';
SET @rank=0;
SET @cumule_Edit=0;
SELECT @rank:=@rank+1 AS "المركز", s.* 
FROM (
    select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), AS "المستخدم", COUNT(*) AS "عدد المقالات" 
    from logging
    INNER JOIN actor on logging.log_actor = actor_id
    where log_timestamp between @start_date and @end_date   
    and log_type in ("delete")
    group by logging.log_actor
    having COUNT(*)>0
    ORDER BY COUNT(*) DESC
    LIMIT 50
) s;
/* أكثر الإداريين منعًا*/
SET @rank=0;
SELECT @rank:=@rank+1 AS "المركز", s.*
FROM (
    select CONCAT('[[مستخدم:',actor_name,'|',actor_name,']]'), COUNT(*)
        from logging
        INNER JOIN actor on logging.log_actor = actor_id
        where log_timestamp between @start_date and @end_date
        and log_type in ("block")
        group by logging.log_actor
        having COUNT(*)>0
        ORDER BY COUNT(*) DESC
    LIMIT 50
 ) s;
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...