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
EqJjgOa8rVvsRmZL
.
Toggle Highlighting
SQL
select count(1) from redirect join page sp on rd_from = sp.page_id join page tp on rd_title = tp.page_title and rd_namespace = tp.page_namespace where (sp.page_title like CONCAT(rd_title, '\_(%)') or sp.page_title like CONCAT(rd_title, ',\_%')) and sp.page_title not like '%\_(disambiguation)' and sp.page_id not in (select cl_from from categorylinks where cl_to = 'Redirects_from_unnecessary_disambiguation') and tp.page_id in (select cl_from from categorylinks where cl_to = 'All_disambiguation_pages') and rd_namespace = sp.page_namespace and rd_fragment = '' and sp.page_namespace = 0 -- group by rd_namespace -- select sp.page_namespace, sp.page_title, tp.page_namespace, tp.page_title, rd_fragment from redirect -- join page sp on rd_from = sp.page_id -- join page tp on rd_title = tp.page_title and rd_namespace = tp.page_namespace -- where sp.page_id in (select cl_from from categorylinks where cl_to = 'Redirects_to_disambiguation_pages') -- and tp.page_id not in (select cl_from from categorylinks where cl_to IN ('All_disambiguation_pages', 'All_set_index_articles')) -- and rd_fragment != '' -- and rd_title not like '%_(disambiguation)' -- and rd_namespace != page_namespace -- and page_is_redirect = 1 -- and page_title like '%_(disambiguation)' -- and substring(page_title, 1, INSTR(page_title, "_(disambiguation)")-1) not in (select page_title from page) limit 100
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...