Fork of Commons images only in hidden cat by Estopedist1
This query is marked as a draft This query has been published by Estopedist1.

SQL

x
 
use enwiki_p;
select CONCAT ('category:',cl_to,'')
#from page p1 left outer join 
FROM categorylinks AS cl
#cl_from = p1.page_id left join page p2 on cl_to = p2.page_title and
#p2.page_namespace = 14 left join page_props on p2.page_id = pp_page
WHERE cl_to NOT IN (select page_title from page where page_namespace=14)
#p1.page_is_redirect = 0 
#AND p1.page_title not like '%Santulan_Mahanta%'
#group by p1.page_title 
#having count(cl_from)-count(pp_propname) = 1
#order by p1.page_title desc
LIMIT 2;
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.

Checking query status...