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
Matěj Suchánek
.
This is a testing alternative for https://quarry.wmflabs.org/query/1298
Toggle Highlighting
SQL
USE wikidatawiki_p; SELECT rev_timestamp, rev_user_text, epp_entity_id, CONCAT('[[Special:Diff/',rev_id,']]') AS revid, rev_comment, COUNT(links.pl_from) FROM wb_entity_per_page JOIN revision ON rev_comment LIKE '/* wbsetsitelink-remove:%' AND rev_page = epp_page_id LEFT JOIN wb_items_per_site ON ips_item_id = epp_entity_id LEFT JOIN (SELECT * FROM pagelinks WHERE pl_namespace = 0 AND pl_from_namespace = 0) AS links ON links.pl_title = CONCAT("Q",epp_entity_id) LEFT JOIN user_groups ON ug_user = rev_user WHERE ips_site_id IS NULL AND epp_redirect_target IS NULL AND (ug_group IS NULL OR NOT ug_group = "bot") AND NOT EXISTS ( SELECT rev_id, rev_page, rev_comment FROM revision AS revision2 WHERE revision2.rev_page = rev_page AND revision2.rev_comment LIKE '%sitelink-remove:%' AND revision2.rev_timestamp > rev_timestamp ) GROUP BY epp_entity_id HAVING COUNT(links.pl_from) < 21 ORDER BY rev_timestamp;
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...