query-9bf6c2b0928dded74dec734bb9bdb625
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?number_of_external_identifiers (COUNT(DISTINCT ?item) AS ?number_of_insect_objects)
WHERE
{
{
SELECT ?item ?number_of_external_identifiers
WHERE
{
?item wdt:P6039 [] .
?item wikibase:identifiers ?number_of_external_identifiers .
FILTER (?number_of_external_identifiers <= 7 )
}
} ?item wdt:P171* wd:Q1390 .
}
GROUP BY ?number_of_external_identifiers
ORDER BY ?number_of_external_identifiers
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?number_of_external_identifiers"):::projected
v3("?number_of_insect_objects")
a1((" "))
c5(["wd:Q1390"]):::iri
f0[["?number_of_external_identifiers <= '7^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P6039"--> a1
v2 --"wikibase:identifiers"--> v1
v2 --"wdt:P171"--> c5
bind2[/"count(?item)"/]
v2 --o bind2
bind2 --as--o v3