This query is marked as a draft This query has been published by IKhitron.

SQL

x
 
set @template = 'מדד_תל_אביב_35';
use hewiki_p;
select pl_title as 'article without template' from page join pagelinks
on page_id = pl_from
where page_namespace = 10
and page_title = @template
and pl_namespace = 0
and exists
(select * from page
 where page_namespace = pl_namespace
 and page_title = pl_title
 and not exists
 (select * from templatelinks
  where tl_from = page_id
  and tl_title = @template));
select page_title as 'article not included in template' from page p join templatelinks
on page_id = tl_from
where tl_title = @template
and page_namespace = 0
and exists
(select * from page
 where page_namespace = 10
 and page_title = @template
 and not exists
 (select * from pagelinks
  where page_id = pl_from
  and pl_namespace = p.page_namespace
  and pl_title = p.page_title))
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...