query-caf8690e2ae9e3beb289d263723b1209
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_of_external_identifiers
WHERE
{
{
SELECT ?item (COUNT(?id) AS ?count_of_external_identifiers)
WHERE
{
SERVICE bd:slice
{
?item wdt:P6039 [] .
bd:serviceParam bd:slice.offset 50000 .
bd:serviceParam bd:slice.limit 10000 .
}
OPTIONAL
{
?item ?id ?value .
?p wikibase:directClaim ?id .
?p wikibase:propertyType wikibase:ExternalId
}
}
GROUP BY ?item
} SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count_of_external_identifiers"):::projected
v2("?id")
v1("?item"):::projected
v4("?p")
v3("?value")
a1((" "))
c13(["en"]):::literal
c10(["wikibase:ExternalId"]):::iri
c3(["bd:serviceParam"]):::iri
c5(["50000^^xsd:integer"]):::literal
c7(["10000^^xsd:integer"]):::literal
subgraph s1["http://www.bigdata.com/rdf#slice"]
style s1 stroke-width:4px;
v1 --"wdt:P6039"--> a1
c3 --"bd:slice.offset"--> c5
c3 --"bd:slice.limit"--> c7
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -->v2--> v3
v4 -."wikibase:directClaim".-> v2
v4 --"wikibase:propertyType"--> c10
end
bind1[/"count(?id)"/]
v2 --o bind1
bind1 --as--o v5
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c3 --"wikibase:language"--> c13
end