query-d6ad148f4fde686ba2284c9d15b1140f

rq turtle/ttl

More than one given name with best rank for all given name claims. normal rank for the preferred given name. In some cases, none of multiple given names can be identified as preferred, which means we use preferred rankWe use

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel (COUNT(?givenname) AS ?cnt) WHERE {
   {
  SELECT DISTINCT ?item WHERE {
    ?item p:P106/ps:P106/wdt:P279* wd:Q26270618 .
  }
}.
  ?item p:P735 ?givenname .
  ?givenname a wikibase:BestRank .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?item ?itemLabel HAVING(?cnt>1)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?cnt") v3("?givenname"):::projected v2("?item"):::projected a1((" ")) a2((" ")) c10(["bd:serviceParam"]):::iri c5(["wd:Q26270618"]):::iri c8(["wikibase:BestRank"]):::iri c12(["en"]):::literal f0[["?cnt > '1^^xsd:integer'"]] f0 --> v4 v2 --"p:P106"--> a1 a1 --"p:statement/P106"--> a2 a2 --"p:direct/P279"--> c5 v2 --"p:P735"--> v3 v3 --"a"--> c8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind2[/"count(?givenname)"/] v3 --o bind2 bind2 --as--o v4