Fork of Moscow metro lost pages by IKhitron
This query is marked as a draft This query has been published by IKhitron.

SQL

AخA
 
set @page = 10070015;
# set @page = todo;
select pl_title as 'a' from pagelinks
where pl_from = @page
and not pl_namespace
and not pl_title in
(select page_title from page
 where page_id in
 (select tl_from from templatelinks
  where tl_target_id = 21855)
 and not page_namespace)
and not pl_title in
(select page_title from page
 where page_title = pl_title
 and page_namespace = pl_namespace
 and page_is_redirect);
select page_title from page
where page_id in
(select tl_from from templatelinks
 where tl_target_id = 21855)
and not page_namespace
and not page_title in
(select pl_title from pagelinks
 where pl_from = @page
 and not pl_namespace)
and not page_title in ('todo')
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...