Replicas browser and optimizer
This query is marked as a draft
This query has been published
Find objects with same id and more than x occurrences, but missing common category with same id
use commonswiki_p; #describe category; set @cat := 'Cultural_heritage_monuments_in_Austria_with_known_IDs'; SELECT cl_sortkey_prefix as id, (select concat('[[:commons:File:',@p:=replace(page_title,'_',' '),'|',@p,']]') from page where page_id = cl_from) as title, cl_type as type, count(*) as pcount from categorylinks WHERE cl_to = @cat #and cl_sortkey_prefix='' and cl_sortkey_prefix not in (select cl_sortkey_prefix from categorylinks where cl_type = 'subcat' and cl_to = @cat) group by id having count(*) > 3 order by type asc # internal key seems not to match collation of values , 4 desc # count #LIMIT 300 ;
By running queries you agree to the
and you irrevocably agree to release your SQL under
All SQL code is licensed under
Checking query status...
Report a bug!
Wikimedia Cloud VPS
, written in