query-3b9b2cbd3447982bc4d7830f1e4414cb

rq turtle/ttl

title:Count each external identifier only once SELECT (COUNT(DISTINCT ?wdt) as ?count) ?n WHERE { ?p wikibase:propertyType wikibase:ExternalId .
?p wikibase:directClaim ?wdt . wd:Q11922067 ?wdt [] . wd:Q11922067 wikibase:identifiers ?n . } GROUP BY ?n

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
#title:Count each external identifier only once
SELECT (COUNT(DISTINCT ?wdt) as ?count) ?n 
WHERE 
{
  ?p wikibase:propertyType wikibase:ExternalId .   
  ?p wikibase:directClaim ?wdt .
  wd:Q11922067 ?wdt [] .
  wd:Q11922067 wikibase:identifiers ?n .
}
GROUP BY ?n

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v3("?n"):::projected v1("?p") v2("?wdt"):::projected a1((" ")) c4(["wd:Q11922067"]):::iri c2(["wikibase:ExternalId"]):::iri v1 --"wikibase:propertyType"--> c2 v1 --"wikibase:directClaim"--> v2 c4 -->v2--> a1 c4 --"wikibase:identifiers"--> v3 bind1[/"count(?wdt)"/] v2 --o bind1 bind1 --as--o v4