Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Ukwiki templates with links to disambiguations
by
Base
This query is marked as a draft
This query has been published
by
He7d3r
.
Toggle Highlighting
SQL
SELECT CONCAT("{{tl|", page_title, "}}") as template_name, COUNT(pl_title) as number_of_links, CONCAT("[[", GROUP_CONCAT(pl_title ORDER BY pl_title ASC SEPARATOR "]], [["), "]]") as links FROM ptwiki_p.pagelinks JOIN ptwiki_p.page ON page_namespace = 10 AND ptwiki_p.page.page_id = ptwiki_p.pagelinks.pl_from WHERE pl_from_namespace = 10 AND pl_namespace = 0 AND pl_title IN ( SELECT page_title FROM ptwiki_p.page_props JOIN ptwiki_p.page ON ptwiki_p.page.page_id = ptwiki_p.page_props.pp_page WHERE ptwiki_p.page_props.pp_propname = "disambiguation" AND page_namespace = 0 ) GROUP BY page_title ORDER BY number_of_links DESC, page_title ASC
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...