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
Nettrom
.
Count the number of transclusions of Шаблон:I уровень, Шаблон:II уровень, Шаблон:III уровень, and Шаблон:IV уровень in Main and Talk namespaces (ns=0|1).
Toggle Highlighting
SQL
USE ruwiki_p; SELECT count(DISTINCT pd.page_id) AS numarticles_level_1_t FROM page ps JOIN templatelinks tl ON (tl_namespace=page_namespace AND tl_title=page_title) JOIN page pd ON tl.tl_from=pd.page_id WHERE pd.page_namespace IN (0,1) AND ps.page_id=287381; SELECT count(DISTINCT cl_from) AS numarticles_level_1_c FROM page p JOIN categorylinks cl ON p.page_id=cl.cl_from WHERE cl_to LIKE 'Статьи_проекта%I_уровня' AND p.page_namespace IN (0,1); SELECT count(*) AS numarticles_level_2 FROM page ps JOIN templatelinks tl ON (tl_namespace=page_namespace AND tl_title=page_title) JOIN page pd ON tl.tl_from=pd.page_id WHERE pd.page_namespace IN (0,1) AND ps.page_id=287383; SELECT count(*) AS numarticles_level_3 FROM page ps JOIN templatelinks tl ON (tl_namespace=page_namespace AND tl_title=page_title) JOIN page pd ON tl.tl_from=pd.page_id WHERE pd.page_namespace IN (0,1) AND ps.page_id=287384; SELECT count(*) AS numarticles_level_4 FROM page ps JOIN templatelinks tl ON (tl_namespace=page_namespace AND tl_title=page_title) JOIN page pd ON tl.tl_from=pd.page_id WHERE pd.page_namespace IN (0,1) AND ps.page_id=287385;
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...