query-bbebf3a9a750fd2ebbb5e9e955fcf243
Albanian citiziens that have an article in EN or IT wiki but not in SQ
SELECT ?item ?itemLabel (COUNT(distinct ?article) as ?count)
{
{
SELECT ?item
{
{
hint:Query hint:optimizer "None" .
?item wdt:P31 wd:Q5 .
?item wdt:P27 wd:Q222 .
MINUS {?sitelinksq schema:about ?item . ?sitelinksq schema:isPartOf https://sq.wikipedia.org/}
}
?article schema:about ?item .
{
?article schema:isPartOf https://it.wikipedia.org/
}
UNION
{
?article schema:isPartOf https://en.wikipedia.org/
}
}
}
?article schema:about ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,it" }
}
GROUP BY ?item ?itemLabel
ORDER BY DESC(?count)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Albanian citiziens that have an article in EN or IT wiki but not in SQ
SELECT ?item ?itemLabel (COUNT(distinct ?article) as ?count)
{
{
SELECT ?item
{
{
?item wdt:P31 wd:Q5 .
?item wdt:P27 wd:Q222 .
MINUS {?sitelinksq schema:about ?item . ?sitelinksq schema:isPartOf <https://sq.wikipedia.org/>}
}
?article schema:about ?item .
{
?article schema:isPartOf <https://it.wikipedia.org/>
}
UNION
{
?article schema:isPartOf <https://en.wikipedia.org/>
}
}
}
?article schema:about ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,it" }
}
GROUP BY ?item ?itemLabel
ORDER BY DESC(?count)