query-650e74406af224db3af302dd22b1b8f1
, which gives you further insight into my frail grip on aggregation.(COUNT(DISTINCT ?river) ... or (COUNT(?river) ... or (COUNT(?count_linked_items) ...But if I now try to count how many rivers have particular counts of incoming links, I get batshit insane numbers - there's now one instance of a river with 648 incoming links. It doesn't seem to make any difference whether I 19:02, 4 March 2022 (UTC) JuraPlenty of places could be located on a given river and plenty of bridges (and roads?) could cross a river. --- What numbers are you looking for?
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 ?property ?propertyLabel ?count ?sample ?sampleLabel
WHERE
{
{
SELECT ?property (count(distinct ?bla) as ?count) (SAMPLE(?bla) as ?sample)
{
?bla ?predicate wd:Q19721 .
?property wikibase:directClaim ?predicate .
}
group by ?property
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?bla")
v5("?count"):::projected
v3("?predicate")
v4("?property"):::projected
v5("?sample"):::projected
c4(["bd:serviceParam"]):::iri
c1(["wd:Q19721"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 -->v3--> c1
v4 --"wikibase:directClaim"--> v3
bind2[/"count(?bla)"/]
v2 --o bind2
bind2 --as--o v5
bind3[/"sample(?bla)"/]
v2 --o bind3
bind3 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end