SQL
x
select now();
use wikidatawiki_p;
SELECT REPLACE(tl_title, "_", " ") As tmpl, COUNT(*) As cnt, "" as QID
FROM enwiki_p.templatelinks, enwiki_p.page_props As wpage_props
WHERE tl_title like "تصنيف:%" and tl_from = wpage_props.pp_page AND wpage_props.pp_propname = "wikibase_item"
AND wpage_props.pp_page = tl_from
AND wpage_props.pp_value IN ( SELECT page_title
FROM page, page_props, wb_entity_per_page, wb_items_per_site
WHERE ips_site_id = 'arwiki' AND pp_page = epp_page_id
AND pp_propname = "wb-claims" AND epp_entity_id = ips_item_id
AND epp_entity_type = "item" AND page_id = pp_page
and pp_sortkey=0)
GROUP BY tl_title ORDER BY COUNT(tl_title) 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.