SQL
x
/*
select category.* from categorylinks
join page on cl_from = page_id
join category on page_title = cat_title and cat_pages > cat_subcats
where cl_to = 'Wikipedia_soft_redirected_categories' and cl_type = 'subcat'
*/
select cat_title from category
where cat_pages = 0
and cat_title not in (
select page_title from categorylinks join page on cl_from = page_id
where cl_to in ('Wikipedia_soft_redirected_categories', 'Disambiguation_categories', 'Empty_categories_awaiting_deletion',
'All_categories_for_discussion', 'Redirect-Class_articles', 'Tracking_categories') and cl_type = 'subcat'
)
and cat_title not in (
select page_title from templatelinks join page on tl_from = page_id where tl_target_id in (
select lt_id from linktarget
where lt_title in ('Possibly_empty_category', 'Maintenance_category',
'Maintenance_category_autotag') and lt_namespace = 10
)
)
and cat_title in (select page_title from page where page_namespace = 14);
-- select to_base64(cat_title) from category where cat_pages = 0 and cat_title like '%Portuguese%people%'
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.