Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Danilo.mac
.
Toggle Highlighting
SQL
SELECT CONCAT('Categoria:', REPLACE(cat_title, '_', ' ')) CATEGORIA, GROUP_CONCAT(cl_to SEPARATOR ', ') É_SUBCAT_DE FROM category INNER JOIN page ON cat_title = page_title AND page_namespace = 14 LEFT JOIN categorylinks ON page_id = cl_from WHERE cat_pages = 1 AND cat_subcats = 0 AND cat_title NOT IN ( SELECT page_title FROM page INNER JOIN categorylinks ON cl_from = page_id WHERE cl_to IN ('!Redirecionamentos_de_categorias', '!Categorias_vazias_que_não_devem_ser_eliminadas') AND page_namespace = 14 ) AND page_id NOT IN (SELECT DISTINCT page_id FROM page INNER JOIN langlinks ON page_id = ll_from WHERE page_namespace = 14 ) AND cat_title NOT LIKE '!%' GROUP BY page_id LIMIT 2000
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...