SQL
AخA
use hywikiquote_p;
SELECT #count(*)
#p.page_title
concat('* [[Category:',p.page_title,']]')
#concat('Template:',p.page_title), CONCAT("Ssawiki"), concat('Template:',p.page_title)
#concat('* [[Template:',p.page_title,']]'), concat(' - [[:en:Template:',p.page_title,'|en]]')
from page p
where p.page_namespace=14
and p.page_is_redirect=0
and not exists (SELECT eu_page_id
from wbc_entity_usage wb where eu_page_id=p.page_id
GROUP BY eu_page_id)
and not exists (select ll_from from langlinks ll where ll_from=p.page_id)
and exists (select p2.page_title
from hywiki_p.page p2
where p.page_title=p2.page_title and p2.page_is_redirect=0 and p2.page_namespace=14
and p2.page_id in (SELECT wb2.eu_page_id
from hywiki_p.wbc_entity_usage wb2
GROUP BY wb2.eu_page_id)
)
limit 10;
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.