SQL
x
use plwikisource_p;
select count(distinct tl_from) as with_scans_by_Phe
from templatelinks left join page on page_id=tl_from
where tl_namespace=100 and page_namespace=0;
SELECT count(DISTINCT tl_from) as with_scans_by_Phe_way2
FROM
templatelinks,
page
WHERE
page_id=tl_from AND
tl_namespace = 100 AND
page_namespace = 0;
select count(distinct page_id) as all_texts from page where page_namespace=0 and page_is_redirect=0;
select count(page_title) as disamb from page where page_namespace = 0 and page_is_redirect = 0 and page_id in (select pp_page from page_props where pp_propname = 'disambiguation');
SELECT
count(page_id) as disamb1
FROM
page,
templatelinks
WHERE
page_id=tl_from AND
page_namespace=0 AND
tl_namespace=10 AND
tl_title='Disambig';
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.