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 query lists items with no sitelinks which had some sitelinks before, but they were removed. It has its testing alternative at https://quarry.wmflabs.org/query/1269
Toggle Highlighting
SQL
use wikidatawiki_p; SELECT CONCAT('* [[User:',rev_user_text,'|]] [[Special:Diff/',rev_id,'|removed]] a sitelink from [[',page_title,']] at ',rev_timestamp, " with comment: ''",REPLACE(REPLACE(REPLACE(rev_comment,' */','}}'),'/* wbsetsitelink-remove:','{{int:wikibase-item-summary-wbsetsitelink-remove|'),'}} ','}}: '),"''") AS log FROM wb_entity_per_page JOIN page ON page_is_redirect = 0 AND page_id = epp_page_id JOIN (SELECT * FROM revision WHERE rev_comment LIKE '/* wbsetsitelink-remove:%' AND NOT rev_user = 587697) AS rev1 ON rev1.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 = page_title WHERE ips_site_id IS NULL AND NOT EXISTS ( SELECT rev_id, rev_page, rev_comment FROM revision AS revision2 WHERE revision2.rev_page = rev1.rev_page AND revision2.rev_comment LIKE '/* wbsetsitelink-remove:%' AND revision2.rev_id > rev1.rev_id) GROUP BY page_title HAVING COUNT(links.pl_from) = 0 ORDER BY rev1.rev_id LIMIT 2000;
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...