SQL
x
use enwiki_p;
SELECT user_name, user_editcount, user_registration, rev_timestamp as last_edit
FROM `user`
JOIN revision_userindex
ON rev_id = (SELECT rev_id FROM revision_userindex
WHERE user_id = rev_user
ORDER BY rev_timestamp DESC
LIMIT 1)
LEFT JOIN (select i.ipb_user as blocked_user, i.ipb_expiry as block_expires from ipblocks i join (select ipb_user, max(ipb_timestamp) as lb_ts from ipblocks group by ipb_user) lb on i.ipb_user = lb.ipb_user and i.ipb_timestamp = lb.lb_ts) cur_block on blocked_user = user_id
WHERE rev_timestamp > 20161127000000
AND user_registration < 20171028000000
AND user_editcount > 149
AND (block_expires is null or NOT(block_expires = 'infinity' or block_expires >= 201711270000))
;
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.