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

SQL

AخA
 
select DISTINCT concat("Template:",page_title) as pagename, count(*) as Template
from page 
join templatelinks on page_title = tl_title 
where tl_namespace = 10 
AND page_title not like "%/%" 
AND page_namespace = 10          
AND page_is_redirect = 0        
AND exists (
    SELECT *
    FROM templatelinks
    WHERE tl_from=page_id 
    AND tl_namespace = 10
    AND tl_title ="Navbox" 
    limit 1 
)/*
and exists ( 
    select * 
    from categorylinks
    where 
      cl_from=page_id and 
      cl_to = "قوالب_معلومات_مباني"
   #and   cl_to = "قوالب_تنسيق_ويكيبيديا"
    limit 1 
  )*/
group by page_id
order by Template desc, page_title
limit 10;
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...