User:Faebot/SandboxG

From Wikimedia Commons, the free media repository
Jump to: navigation, search
+---------------+---------+-----------+----------+----------------------+-----------+
| user          | id      | editcount | expiry   | reason               | admin     |
+---------------+---------+-----------+----------+----------------------+-----------+
| Najadenn      | 2693487 |        12 | infinity | user request         | 32X       |
| SHEnterprises | 2440249 |         6 | infinity | [[COM:UPOLICY#Inappr | INeverCry |
| ExchangeAG    | 1878648 |         5 | infinity | [[COM:UPOLICY#Inappr | INeverCry |
| GCBFrankfurt  | 1872292 |         3 | infinity | [[COM:UPOLICY#Inappr | INeverCry |
| BCCG          | 3028539 |         3 | infinity | [[COM:UPOLICY#Inappr | INeverCry |
| Cinemaxx      | 1937579 |         1 | infinity | [[COM:UPOLICY#Inappr | INeverCry |
+---------------+---------+-----------+----------+----------------------+-----------+

Result of:
SELECT
    uc.user_name AS user,
    uc.user_id AS id,
    uc.user_editcount AS editcount,
    bc.ipb_expiry AS expiry,
    LEFT(bc.ipb_reason, 20) AS reason
FROM commonswiki_p.user uc
JOIN commonswiki_p.ipblocks bc ON bc.ipb_user=uc.user_id
JOIN dewiki_p.page ON page_title=uc.user_name AND page_namespace=2
JOIN dewiki_p.categorylinks ON page_id=cl_from
WHERE
    cl_to = "Benutzer:Verifiziert"
ORDER BY uc.user_editcount DESC;

-- (talk) 16:01, 4 December 2014 (UTC)