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

SQL

AخA
 
USE arwiki_p;
SELECT  user_name,
        SUM(CAST(rev.rev_len as signed) - CAST(COALESCE(parent.rev_len,0) as signed)) AS edits_bytes,
        COUNT(rev.rev_id) AS edit_count
    FROM arwiki_p.revision rev
        INNER JOIN  revision rev
             ON user_id = rev.rev_user
        LEFT OUTER JOIN revision parent #self join for parent diff size
            ON rev.rev_parent_id = parent.rev_id
        JOIN page
            ON rev.rev_page = page_id
#    WHERE page_namespace = 0
    AND rev.rev_timestamp BETWEEN 20160928000000 AND 20161000000000
    AND page_namespace = 0
GROUP BY user_name
ORDER BY edits_bytes 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...