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
JNewham
.
Toggle Highlighting
SQL
WITH RECURSIVE rcte AS ( SELECT DISTINCT p.page_id, p.page_title, cl.cl_from, cl.cl_to, 1 AS depth FROM page p INNER JOIN categorylinks cl ON cl.cl_from = p.page_id AND cl.cl_to = 'Gaming' UNION ALL SELECT DISTINCT p2.page_id, p2.page_title, cl2.cl_from, cl2.cl_to, r.depth + 1 AS depth FROM rcte r INNER JOIN page p2 ON p2.page_id = r.cl_from INNER JOIN categorylinks cl2 ON cl2.cl_from = p2.page_id AND cl2.cl_to = r.page_title ) SELECT r.* FROM rcte r WHERE r.depth <= 3 LIMIT 1
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...