Fork of
!temp to pages
by Mr. Ibrahem
This query is marked as a draft
This query has been published
by Mr. Ibrahem.
SQL
AخA
SELECT
CONCAT('[[:en:Template:', p1.page_title, "]]") as "en",
CONCAT('[[:Template:', p1.page_title, "]]") as "ar",
pl_target_id#count(pl_target_id)
/*,(
SELECT
count(pl_target_id)
FROM
page p2
JOIN pagelinks pl2 ON pl2.pl_from = p2.page_id
WHERE
p2.page_namespace = 10
and p2.page_id = p1.page_id
AND pl2.pl_target_id IN (
SELECT
ll2.ll_from
FROM
langlinks ll2
WHERE
ll2.ll_lang = 'ar'
AND ll2.ll_from = pl2.pl_target_id
)
) as "with_ar"*/
FROM
page p1
JOIN pagelinks ON pl_from = p1.page_id
WHERE
p1.page_namespace = 10
and p1.page_title = "Russian_human_spaceflight_programs"
#and pl_from_namespace = 0
#group by p1.page_title
#order by
#COUNT(pl_target_id) desc
#Limit 3
;
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.