query-64f645a46709d533c027c171ba616017
Armenien citiziens that have an article in EN or RU wiki but not in HY
SELECT ?item ?itemLabel (COUNT(distinct ?article) as ?count)
{
{
SELECT ?item
{
{
hint:Query hint:optimizer "None" .
?item wdt:P31 wd:Q5 .
?item wdt:P27 wd:Q399 .
MINUS {?sitelinkhy schema:about ?item . ?sitelinkhy schema:isPartOf https://hy.wikipedia.org/}
}
?article schema:about ?item .
{
?article schema:isPartOf https://ru.wikipedia.org/
}
UNION
{
?article schema:isPartOf https://en.wikipedia.org/
}
}
}
?article schema:about ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,ru" }
}
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#>
# Armenien citiziens that have an article in EN or RU wiki but not in HY
SELECT ?item ?itemLabel (COUNT(distinct ?article) as ?count)
{
{
SELECT ?item
{
{
?item wdt:P31 wd:Q5 .
?item wdt:P27 wd:Q399 .
MINUS {?sitelinkhy schema:about ?item . ?sitelinkhy schema:isPartOf <https://hy.wikipedia.org/>}
}
?article schema:about ?item .
{
?article schema:isPartOf <https://ru.wikipedia.org/>
}
UNION
{
?article schema:isPartOf <https://en.wikipedia.org/>
}
}
}
?article schema:about ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,ru" }
}
GROUP BY ?item ?itemLabel
ORDER BY DESC(?count)