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 = 10111743;
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 = 44105)
 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 = 44105)
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 ('Петербургский_метрополитен', 'Адмиралтейская_(станция_метро,_Невско-Василеостровская_линия)',
                       'Кольцевая_линия_(Санкт-Петербург)', 'Шуваловский_проспект_(станция_метро)', 'Дачное_(станция_метро)',
                      'Адмиралтейско-Охтинская_линия', 'Гавань_(станция_метро)')
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...