Fork of Untitled query #50373 by Wurgl
This query is marked as a draft This query has been published by Count Count.

SQL

AخA
 
USE dewiki_p;
SELECT total.Benutzername, Revertiert, Gesamt, Revertiert/Gesamt as "Revert-Rate" FROM 
(SELECT 
user_name as "Benutzername", count(rev_id) as "Revertiert"
FROM change_tag_def, change_tag, flaggedrevs, user, revision 
WHERE ct_tag_id=ctd_id AND ct_rev_id=fr_rev_id AND fr_user=user_id AND rev_id=fr_rev_id AND ctd_name = 'mw-reverted' and fr_timestamp<>fr_rev_timestamp
 AND rev_timestamp>'20210201000000'
GROUP BY user_name) AS reverted INNER JOIN 
 (SELECT 
user_name as "Benutzername", count(rev_id) as "Gesamt"
FROM flaggedrevs, user, revision 
WHERE fr_user=user_id AND rev_id=fr_rev_id and fr_timestamp<>fr_rev_timestamp
 AND rev_timestamp>'20210201000000'
GROUP BY user_name
having count(rev_id) >= 10) AS total ON reverted.Benutzername=total.Benutzername ORDER BY Revertiert/Gesamt 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...