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

SQL

x
 
USE hewiki_p;
SELECT distinct(concat('# [[', replace(page_title, "_", " "), ']]')) as 'שם_הערך_לבדיקה_של_מיון_מהיר' FROM categorylinks INNER JOIN page
ON page_id=cl_from
AND page_namespace=0 LEFT JOIN page_props ON pp_propname ='defaultsort' AND pp_page=cl_from
WHERE (cl_to LIKE '%אישים%' OR cl_to LIKE '%שחקני%') AND pp_propname IS NULL
AND (LENGTH(page_title) - LENGTH(REPLACE(page_title, '_', '')))>1
and (replace(page_title, "_", " ") like "% _%(%)"
or page_title not like "%)")
and replace(page_title, "_", " ") not like "%, מלך %"
and replace(page_title, "_", " ") not like "%, נסיך %"
and replace(page_title, "_", " ") not like "%, דוכס %"
and replace(page_title, "_", " ") not like "%, קיסר %"
and replace(page_title, "_", " ") not like "%, הנסיך %"
and replace(page_title, "_", " ") not like "%, נסיכת %"
and replace(page_title, "_", " ") not like "%, קיסרית %"
and replace(page_title, "_", " ") not like "%, המלכה %"
and replace(page_title, "_", " ") not like "%, הרוזנת %"
and replace(page_title, "_", " ") not like "%, מלכת %"
and replace(page_title, "_", " ") not like "%, דוכסית %"
and replace(page_title, "_", " ") not like "%, הדוכס %"
and replace(page_title, "_", " ") not like "%, הרוזן %"
and replace(page_title, "_", " ") not like "%, הדוכסית %"
and replace(page_title, "_", " ") not like "%, יורש העצר %"
and replace(page_title, "_", " ") not like "%, ברון %"
and replace(page_title, "_", " ") not like "%, רוזן %"
and replace(page_title, "_", " ") not like "%, מרקיזת %"
and not page_title like "בית_ה%"
and not page_title like "נמל_התעופה_%"
and not page_title like "%(סרט)"
and not page_title like "%(סדרת_טלוויזיה)"
and not page_title like "פרס_אוסקר_%"
and not page_title like "%&%"
and not exists
(select * from categorylinks
 where page_id = cl_from
 and (cl_to in ('אישים_בתנ"ך', 'אישים_בתלמוד')
 or exists
     (select * from page
      where page_namespace = 14
      and page_title = cl_to
      and exists
       (select * from categorylinks
        where cl_from = page_id
        and (cl_to in ('אישים_בתנ"ך', 'אישים_בתלמוד')
 or exists
 (select * from page
  where page_namespace = 14
  and page_title = cl_to
  and exists
  (select * from categorylinks
   where cl_from = page_id
   and cl_to in ('אישים_בתנ"ך', 'אישים_בתלמוד'))))))))
and not exists
(select * from pagelinks
 where pl_from = 1345702
 and pl_namespace = 0
 and pl_title = 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...