Thank you Martyna and Nicola. Both queries worked perfectly!
Bob
On 1/24/22 6:21 PM, Nicola Vitucci wrote:
Hey Bob,
does this one do what you're after?
SELECT DISTINCT ?cl (COUNT(DISTINCT ?p) AS ?c)
WHERE {
?s a ?cl .
?s ?p ?o .
}
GROUP BY ?cl
Nicola
Il giorno lun 24 gen 2022 alle
Thanks Alasdair,
This looks really useful. I haven't seen this query though - have I missed
it or were you not specifically referring to this?
Nicola
Il mar 25 gen 2022, 10:21 Gray, Alasdair ha
scritto:
> We defined a lot of useful statistics queries for datasets in §6.6 of the
> W3C HCLS
We defined a lot of useful statistics queries for datasets in §6.6 of the W3C
HCLS Dataset Description Guidelines
https://www.w3.org/TR/hcls-dataset/#s6_6
I’ve made these available in a GitHub repo
https://github.com/AlasdairGray/HCLS-Stats-Queries
Hopefully you find these helpful
Alasdair
--
Hey Bob,
does this one do what you're after?
SELECT DISTINCT ?cl (COUNT(DISTINCT ?p) AS ?c)
WHERE {
?s a ?cl .
?s ?p ?o .
}
GROUP BY ?cl
Nicola
Il giorno lun 24 gen 2022 alle ore 23:05 Bob DuCharme ha
scritto:
> Using arq and the data at
>
You're counting the same thing you're grouping by. I think you need:
SELECT ?c (COUNT(DISTINCT ?p) AS ?pcount)
WHERE {
?s a ?c .
?s ?p ?o .
}
GROUP BY ?c