SQL
x
use wikidatawiki_p;
SELECT anon_1.rev_user AS anon_1_rev_user,
sum(anon_1.byte_change) AS net_sum,
sum(abs(anon_1.byte_change)) AS absolute_sum,
sum(CASE
WHEN (anon_1.byte_change > 0)
THEN anon_1.byte_change
ELSE 0 END
) AS positive_only_sum,
sum(CASE
WHEN (anon_1.byte_change < 0)
THEN anon_1.byte_change
ELSE 0 END
) AS negative_only_sum,
user_registration,
user_name
FROM (SELECT revision.rev_user AS rev_user,
( cast(revision.rev_len as signed)
- cast(coalesce(anon_2.rev_len, 0) as signed)
) AS byte_change
FROM revision
INNER JOIN
page ON page.page_id = revision.rev_page
LEFT OUTER JOIN
(SELECT revision.rev_id AS rev_id,
revision.rev_len AS rev_len
FROM revision
) AS anon_2 ON revision.rev_parent_id = anon_2.rev_id
WHERE revision.rev_timestamp > '20180130235959' and revision.rev_timestamp < '20180501000000' and revision.rev_user_text in ("Sangappadyamani
","Dhanalakshmi .K. T","
Anoosha k")#and page.page_namespace IN (0)
) AS anon_1
JOIN user ON user_id=rev_user
GROUP BY user_name
ORDER BY absolute_sum 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.