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
Sirius li
.
Toggle Highlighting
SQL
/* Wikipedia articles that are three links away from the article "Educational Technology" This query is extra ugly because MariaDB doesn't yet support WITH statements */ SELECT DISTINCT p.* FROM ( SELECT DISTINCT p2.page_id, pl.pl_namespace AS page_namespace, pl.pl_title AS page_title, 3 AS link_distance FROM ( SELECT DISTINCT p.* FROM ( SELECT DISTINCT p2.page_id, pl.pl_namespace AS page_namespace, pl.pl_title AS page_title, 2 AS link_distance FROM ( SELECT DISTINCT p.* FROM ( SELECT DISTINCT p2.page_id, pl.pl_namespace AS page_namespace, pl.pl_title AS page_title, 1 AS link_distance FROM page p JOIN pagelinks pl ON pl.pl_from = p.page_id AND pl.pl_namespace = p.page_namespace JOIN page p2 ON p2.page_namespace = pl.pl_namespace AND p2.page_title = pl.pl_title WHERE p.page_namespace = 0 AND p.page_title = 'Educational_technology' ) AS p JOIN pagelinks pl ON pl.pl_from = p.page_id AND pl.pl_namespace = p.page_namespace GROUP BY p.page_id, p.page_title HAVING COUNT(1) < 100 -- avoid really general topics ) AS p JOIN pagelinks pl ON pl.pl_from = p.page_id AND pl.pl_namespace = p.page_namespace JOIN page p2 ON p2.page_namespace = pl.pl_namespace AND p2.page_title = pl.pl_title ) AS p JOIN pagelinks pl ON pl.pl_from = p.page_id AND pl.pl_namespace = p.page_namespace GROUP BY p.page_id, p.page_title HAVING COUNT(1) < 100 -- avoid really general topics ) AS p JOIN pagelinks pl ON pl.pl_from = p.page_id AND pl.pl_namespace = p.page_namespace JOIN page p2 ON p2.page_namespace = pl.pl_namespace AND p2.page_title = pl.pl_title ) AS p JOIN pagelinks pl ON pl.pl_from = p.page_id AND pl.pl_namespace = p.page_namespace GROUP BY p.page_id, p.page_title HAVING COUNT(1) < 100 -- avoid really general topics
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...