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
Fish bowl
.
Toggle Highlighting
SQL
-- modified from https://quarry.wmcloud.org/query/72051 by Bing AI WITH zh_forms AS ( SELECT * FROM linktarget WHERE lt_namespace = 10 AND lt_title = 'zh-forms' ), template_params AS ( SELECT page_id, content_address FROM slots JOIN revision ON rev_id = slot_revision_id JOIN page ON rev_page = page_id WHERE slot_role_id = 1 -- main slot ), page_text AS ( SELECT page_id, old_text FROM template_params JOIN text ON old_id = REPLACE(content_address, 'tt:', '')::integer ) SELECT DISTINCT page_title, REGEXP_EXTRACT_ALL(page_text.old_text,'{{zh-forms[^{}]+}}') AS zh_forms_instances FROM page JOIN templatelinks ON tl_from = page_id JOIN page_text ON page_text.page_id = page_id WHERE tl_target_id = (SELECT lt_id FROM zh_forms) AND LENGTH(page_title) = 3 -- One Han character is 3 bytes in UTF-8 encoding.
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...