@kadin
You can use the MIN()
function in SPARQL to display only the minimum value of a count. Here's an example query that demonstrates how to do this:
1 2 3 4 5 6 7 8 9 10 11 |
SELECT (MIN(?count) as ?minCount) WHERE { ?subject ?predicate ?object . { SELECT ?subject (COUNT(?predicate) as ?count) WHERE { ?subject ?predicate ?object . } GROUP BY ?subject } } |
In this query, we first count the number of predicates for each subject using a subquery and the GROUP BY
clause. Then, we use the MIN()
function to find the minimum count value. Finally, we display only the minimum count value as ?minCount
.