Fork of
omonime interwiki de unit itemii
by XXN
This query is marked as a draft
This query has been published
by XXN.
SQL
AخA
use cebwiki_p;
select page_title#, pp_value
from page
LEFT JOIN langlinks ON ll_from = page_id
#JOIN (SELECT * FROM page_props WHERE pp_propname = 'wikibase_item') AS props ON pp_page = page_id
join categorylinks on page_id=cl_from
#JOIN templatelinks ON tl_from = page_id and tl_namespace = 10
where cl_to = "Liberya_paghimo_ni_bot"#like "Civil_parishes_in%"
#AND tl_title = "Lang-bg"
and page_id in (select pl_from FROM cebwiki_p.pagelinks cpl
where cpl.pl_title = "Administratibo_nga_mga_dibisyon_sa_Liberya")
#and REPLACE(page_title, ',_Chile', '') in (select REPLACE(page_title, '_(kommun_i_Chile)', '')
and page_title in (select page_title
#and page_title in (select SUBSTRING_INDEX(REPLACE(page_title, 'Opština_', ''), ',', 1)
from enwiki_p.page
#join svwiki_p.categorylinks c1 on page_id=c1.cl_from
join enwiki_p.categorylinks c2 on page_id=c2.cl_from
where /*c1.cl_to like "Orter_i%"
and */c2.cl_to = "Districts_of_Liberia")/*like "Municipalities_of%")#= "Robotskapade_Kroatienartiklar")
#c2.cl_to = "Opštine_u_Meksiku")
#and page_id in (select pl_from FROM svwiki_p.pagelinks swpl where swpl.pl_title = "Civil_parish"))*/
/* in ("Populated_places_in_Central_Province,_Sri_Lanka",
"Populated_places_in_Eastern_Province,_Sri_Lanka",
"Populated_places_in_North_Central_Province,_Sri_Lanka",
"Populated_places_in_North_Western_Province,_Sri_Lanka",
"Populated_places_in_Northern_Province,_Sri_Lanka",
"Populated_places_in_Southern_Province,_Sri_Lanka",
"Populated_places_in_Sabaragamuwa_Province",
"Populated_places_in_Uva_Province",
"Populated_places_in_Western_Province,_Sri_Lanka")
)*/#*/
/*
and page_title in (select pl_title FROM svwiki_p.pagelinks swpl
where swpl.pl_from = 6330770)*/
#and page_title like "%(kommun_i_Chile)")
/*
and pp_value not in (select pp_value
from svwiki_p.page
JOIN (SELECT * FROM svwiki_p.page_props WHERE pp_propname = 'wikibase_item') AS props ON pp_page = page_id
join svwiki_p.categorylinks on page_id=cl_from
where cl_to in ("Orter_i_Federationen_Bosnien_och_Hercegovina", "Orter_i_Republika_Srpska") )*/
and ll_from not in (select m.ll_from from langlinks m where m.ll_lang="en")
group by ll_from
#and ll_title != REPLACE(page_title, '_', ' ')
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.
Query status: complete
Executed on Wed, 23 Nov 2016 17:08:24 UTC.