query-11ad250c4c8a6bc4d1b639c5abdbb951

rq turtle/ttl

Biełarusian women covered in other Wikipedias but not in Biełarusan SELECT ?person ?personLabel ?personDescription (COUNT(DISTINCT ?sitelink) as ?linkcount) WHERE { ?person wdt:P31 wd:Q5 . # human ?person wdt:P21 wd:Q6581072 . # woman ?person wdt:P27 wd:Q184 . # Biełarusan ?sitelink schema:about ?person . # get Wikimedia pages about the person FILTER NOT EXISTS { ?links schema:about ?person . # get Wikimedia pages about the person ?links schema:isPartOf https://be.wikipedia.org/ . # but exclude Biełarusan Wikipedia. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],be-tarask,en,uk,pl,ru". } } GROUP BY ?person ?personLabel ?personDescription ORDER BY DESC(?linkcount) LIMIT 1000

Use at

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#>
# Biełarusian women covered in other Wikipedias but not in Biełarusan
SELECT ?person ?personLabel ?personDescription (COUNT(DISTINCT ?sitelink) as ?linkcount) WHERE {
  ?person wdt:P31 wd:Q5 . # human
  ?person wdt:P21 wd:Q6581072 . # woman
  ?person wdt:P27 wd:Q184 . # Biełarusan
  ?sitelink schema:about ?person . # get Wikimedia pages about the person
  FILTER NOT EXISTS {
    ?links schema:about ?person . # get Wikimedia pages about the person
    ?links schema:isPartOf <https://be.wikipedia.org/> . # but exclude Biełarusan Wikipedia.
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],be-tarask,en,uk,pl,ru". }
} GROUP BY ?person ?personLabel ?personDescription
ORDER BY DESC(?linkcount) 
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?linkcount") v2("?links") v3("?person"):::projected v4("?sitelink"):::projected c13(["#91;AUTO_LANGUAGE#93;,be-tarask,en,uk,pl,ru"]):::literal c7(["wd:Q6581072"]):::iri c3([https://be.wikipedia.org/]):::iri c11(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri c9(["wd:Q184"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:isPartOf"--> e0c3 e0v1("?links"):::projected e0v2("?person"):::projected e0c3([https://be.wikipedia.org/]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 f0 --> c2 f0 --> c3 v2 --"schema:about"--> v3 v2 --"schema:isPartOf"--> c3 v3 --"wdt:P31"--> c5 v3 --"wdt:P21"--> c7 v3 --"wdt:P27"--> c9 v4 --"schema:about"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end bind2[/"count(?sitelink)"/] v4 --o bind2 bind2 --as--o v5