Fork of Templates with 50 or more transclusions in ruwiki by Wikisaurus
This query is marked as a draft This query has been published by Wikisaurus.

SQL

AخA
 
USE ruwiki_p;
SELECT
  CONCAT('[[ш:', REPLACE(page_title, '_', ' '), ']]'),
  (
        SELECT
            COUNT(*)
        FROM templatelinks
        WHERE tl_title = page_title
            AND tl_namespace = page_namespace
    ) as transclusion_count
FROM page
JOIN categorylinks
ON cl_from = page_id 
WHERE
  page_namespace = 10
  AND (cl_to LIKE "Шаблоны-карточки%"
    OR cl_to = "Википедия:Шаблоны_для_перевода_на_шаблон_АЕ"
    OR cl_to = "Шаблоны_на_основе_шаблона_Административная_единица"
    OR cl_to = "Шаблоны_на_основе_шаблона АЕ2"
    OR cl_to = "Подстраницы_шаблона_Судно")
GROUP BY page_title
ORDER BY transclusion_count DESC
;
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...