Fork of Hewiki multiple fair use by IKhitron
This query is marked as a draft This query has been published by IKhitron.

SQL

x
 
use hewiki_p;
select concat('# [[:קובץ:', replace(page_title, "_", " "), ']]') as Suspicious_file_title
from page as p1 join image
on exists
(select * from categorylinks as cl1
 where cl_from = page_id
 and (cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן"
      or exists
      (select * from page as p2
       where p2.page_namespace = 14
       and p2.page_title = cl1.cl_to
       and exists
       (select * from categorylinks as cl2
        where cl2.cl_from = p2.page_id
        and (cl2.cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן"
             or exists
             (select * from page as p3
              where p3.page_namespace = 14
              and p3.page_title = cl2.cl_to
              and exists
              (select * from categorylinks as cl3
               where cl3.cl_from = p3.page_id
               and (cl3.cl_to = "ויקיפדיה_-_תמונות_שימוש_הוגן"))))))))
 and page_namespace = 6
 and exists
 (select * from imagelinks as il1
  where il_to = page_title
  and il_from_namespace = 0
  and exists
  (select * from imagelinks as il3
   where il_to = page_title
   and not il_from_namespace = 100
   and il_from_namespace = 0
   and not (il_from = il1.il_from
            and il_from_namespace = il1.il_from_namespace)))
  and img_name = 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.

Query status: complete

Executed on Fri, 28 Jul 2017 12:37:39 UTC.