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
Bri
.
Toggle Highlighting
SQL
SET @ARTICLE_SPACE = 0; # this finds cycles of 3 articles select p1.page_title as 'page_1', p2.page_title as 'page_2', p3.page_title as 'page_3' from page as p1 join page as p2 on p2.page_title in (select pl_title from pagelinks where pl_from=p1.page_id and pl_from not in (select pp_page from page_props where pp_propname="disambiguation")) and p1.page_title != p2.page_title join page as p3 on p3.page_title in (select pl_title from pagelinks where pl_from=p2.page_id and pl_from not in (select pp_page from page_props where pp_propname="disambiguation")) and p2.page_title != p3.page_title where p1.page_title in (select pl_title from pagelinks where pl_from=p3.page_id and pl_from not in (select pp_page from page_props where pp_propname="disambiguation")) and p3.page_title != p1.page_title and p1.page_namespace = @ARTICLE_SPACE and p2.page_namespace = @ARTICLE_SPACE and p3.page_namespace = @ARTICLE_SPACE and p1.page_id < 20 # hack -- testing combinatoric explosion and not p1.page_is_redirect and not p2.page_is_redirect and not p3.page_is_redirect limit 1000;
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...