SQL
AخA
use enwiki_p;
select distinct p2.page_title, count(pl_title)
from pagelinks
inner join page p1 on p1.page_title = pl_title
inner join page p2 on p2.page_id = pl_from
inner join langlinks on ll_from = p1.page_id
where pl_from_namespace = 0
and p1.page_namespace = 0
and pl_namespace = 0
and ll_lang = "ar"
and p2.page_title like "List%"
and pl_from not in (select ll_from from langlinks where ll_lang = "ar" and pl_from = ll_from)
and ll_title in (select arwiki_p.page.page_title from arwiki_p.page inner join arwiki_p.categorylinks on arwiki_p.page.page_id =
arwiki_p.categorylinks.cl_from where arwiki_p.categorylinks.cl_to = "جميع_المقالات_اليتيمة"
and ll_title = arwiki_p.page.page_title)
group by pl_from
order by count(pl_title) desc
limit 30;
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.