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
Superyetkin
.
enwiki articles with no corresponding trwiki entry (category based)
Toggle Highlighting
SQL
SELECT A.baslik, A.dil_sayisi FROM ( SELECT B.en_title AS baslik, COUNT(B.en_title) AS dil_sayisi, MAX(B.site_id) AS site_id FROM ( SELECT C.en_title en_title, (CASE WHEN wdata2.ips_site_id = 'trwiki' THEN 'tr' ELSE NULL END) AS site_id FROM ( SELECT en_page.page_title en_title FROM enwiki_p.page en_page INNER JOIN ( /* 3. seviye */ SELECT DISTINCT cat1.page_title AS cat FROM enwiki_p.page cat1 INNER JOIN enwiki_p.categorylinks cl12 ON cl12.cl_from = cat1.page_id INNER JOIN enwiki_p.page cat2 ON cat2.page_namespace = 14 AND cat2.page_title = cl12.cl_to INNER JOIN enwiki_p.categorylinks cl23 ON cl23.cl_from = cat2.page_id INNER JOIN enwiki_p.page cat3 ON cat3.page_namespace = 14 AND cat3.page_title = cl23.cl_to WHERE cat1.page_namespace = 14 AND cat3.page_title = 'Mathematics_and_art' UNION /* 2. seviye */ SELECT DISTINCT cat1.page_title AS cat FROM enwiki_p.page cat1 INNER JOIN enwiki_p.categorylinks cl12 ON cl12.cl_from = cat1.page_id INNER JOIN enwiki_p.page cat2 ON cat2.page_namespace = 14 AND cat2.page_title = cl12.cl_to WHERE cat1.page_namespace = 14 AND cat2.page_title = 'Mathematics_and_art' ) Z ON 1 = 1 INNER JOIN enwiki_p.categorylinks en_cl ON en_cl.cl_from = en_page.page_id AND en_cl.cl_to = Z.cat WHERE en_page.page_namespace = 0 AND en_page.page_is_redirect = 0 ) C INNER JOIN wikidatawiki_p.wb_items_per_site wdata1 ON wdata1.ips_site_id = 'enwiki' AND wdata1.ips_site_page = REPLACE(C.en_title, '_', ' ') INNER JOIN wikidatawiki_p.wb_items_per_site wdata2 ON wdata1.ips_item_id = wdata2.ips_item_id WHERE wdata2.ips_site_id LIKE '%wiki' ) B GROUP BY B.en_title HAVING site_id IS NULL AND COUNT(B.en_title) >= 1 ) A ORDER BY A.dil_sayisi DESC
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...