query-52d20a131b3a1cf328e81dce40d70c3c
Count the number of external identifiers a person in CBDB has
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription (COUNT(?type) as ?count) WHERE {
SELECT
?item ?itemLabel ?itemDescription ?p ?type
WHERE
{
hint:Query hint:optimizer "None".
BIND( wd:Q487042 as ?item)
{
?item ?wdt [] .
?p wikibase:directClaim ?wdt ; wikibase:propertyType wikibase:ExternalId ; wikibase:propertyType ?type.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?itemDescription ?p ?type
} GROUP BY ?item ?itemLabel ?itemDescription ?count