Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Bdijkstra
.
Note: need to match registered users by ID otherwise the query times out. Executes in ~6 minutes.
Toggle Highlighting
SQL
# registered users SELECT RIGHT(cl_to, 4) AS year, user_name AS `user` FROM page, categorylinks, `user` WHERE cl_to REGEXP '^Wikipedia:Waarschuwing_20[01]' AND cl_from=page_id AND page_namespace=3 AND user_name=REPLACE(page_title, '_', ' ') AND NOT EXISTS (SELECT * FROM ipblocks WHERE ipb_auto=0 AND ipb_user=user_id) UNION # somehow a union is orders of magnitude faster than a single query with OR # IP addresses SELECT RIGHT(cl_to, 4) AS year, page_title AS `user` FROM (SELECT cl_to, page_title FROM categorylinks, page WHERE cl_to REGEXP '^Wikipedia:Waarschuwing_20[01]' AND cl_from=page_id AND page_namespace=3 AND page_title REGEXP '^[1-9][0-9\\.]+(/[0-9]+)?$' ) t LEFT JOIN ipblocks ON (ipb_address=page_title AND ipb_auto=0 AND ipb_user=0) WHERE ipb_address IS NULL ORDER BY year, `user`;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...