SQL
AخA
SELECT CASE WHEN rc_namespace = 0 THEN 'Mainspace' ELSE 'Draft' END AS `Namespace`,
SUM(rc_new_len - COALESCE(rc_old_len, 0)) AS `Bytes added`,
CASE WHEN actor_user IS NULL THEN 'IP' ELSE 'User' END AS `IP/User`
FROM recentchanges
JOIN actor_recentchanges ON actor_id = rc_actor
WHERE rc_new_len > COALESCE(rc_old_len, 0)
AND rc_namespace IN (0, 118)
AND NOT EXISTS (SELECT 1
FROM change_tag
JOIN change_tag_def ON ctd_id = ct_tag_id
WHERE ct_rc_id = rc_id
AND ctd_name = 'mw-reverted')
GROUP BY actor_user IS NULL, rc_namespace;
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.