query-524f1ca084ed14a99486f7d80dead39f
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (COUNT(?id) AS ?count_of_external_identifiers) WHERE {
{
SELECT ?item {
?item wdt:P6039 [] .
}
OFFSET 50000
LIMIT 10000
} OPTIONAL { ?item ?id ?value .
?p wikibase:directClaim ?id .
?p wikibase:propertyType wikibase:ExternalId
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count_of_external_identifiers")
v2("?id"):::projected
v1("?item"):::projected
v4("?p")
v3("?value")
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
c4(["wikibase:ExternalId"]):::iri
v1 --"wdt:P6039"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -->v2--> v3
v4 -."wikibase:directClaim".-> v2
v4 --"wikibase:propertyType"--> c4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"count(?id)"/]
v2 --o bind1
bind1 --as--o v5