Fork of تصانيف معادلة by ASammour
This query is marked as a draft This query has been published by Mr. Ibrahem.

SQL

x
 
use arwiki_p;
select #p.page_title
enwiki_p.categorylinks.cl_to
, count(enwiki_p.categorylinks.cl_from)
from page p
inner join langlinks l1
on l1.ll_from = p.page_id
inner join revision r
on p.page_id=r.rev_page
inner join enwiki_p.page
on enwiki_p.page.page_title = replace(l1.ll_title," ", "_")
inner join enwiki_p.categorylinks
on enwiki_p.categorylinks.cl_from = enwiki_p.page.page_id
inner join enwiki_p.page p2
on p2.page_title = enwiki_p.categorylinks.cl_to
inner join enwiki_p.langlinks el
on p2.page_id  = el.ll_from
inner join page p3
on p3.page_title = replace(replace(el.ll_title, "تصنيف:",""), " ", "_")
where p.page_is_redirect = 0
and p.page_namespace = 0
and enwiki_p.page.page_namespace = 0
and enwiki_p.page.page_is_redirect = 0
and p2.page_id not in (select enwiki_p.categorylinks.cl_from from enwiki_p.categorylinks  where enwiki_p.categorylinks.cl_to = 'Hidden_categories')
and p.page_id not in (select cl_from from categorylinks where cl_to = p3.page_title)
and p3.page_id not in (select cl_from from categorylinks  where cl_to = 'تصنيفات_مخفية')
and p3.page_title not like "صفحات_توضيح%"
and p.page_id not in (select cl_from from categorylinks  where cl_to = 'صفحات_لا_تقبل_التصنيف_المعادل')
and p2.page_is_redirect = 0
and p2.page_namespace = 14
and p3.page_namespace = 14
and p3.page_is_redirect = 0
and l1.ll_lang like "en"
and el.ll_lang like "ar"
and r.rev_timestamp between 20181101000000 and 20190110000000
group by enwiki_p.categorylinks.cl_to
limit 100 ;
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...