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 <a.j.g.g...@hw.ac.uk.invalid> ha
scritto:

> 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
> --
> Alasdair J G Gray
> Associate Professor in Computer Science,
> School of Mathematical and Computer Sciences
> Heriot-Watt University, Edinburgh, UK.
>
> Email: a.j.g.g...@hw.ac.uk<mailto:a.j.g.g...@hw.ac.uk>
> Web: http://www.macs.hw.ac.uk/~ajg33
> ORCID: http://orcid.org/0000-0002-5711-4872
> Office: Earl Mountbatten Building 1.39
> Twitter: @gray_alasdair
>
>
> Heriot-Watt is a global University, as a result my working hours may not
> be your working hours. Do not feel pressure to reply to this email outside
> your working hours.
>
>
> To arrange a meeting:
> https://outlook.office365.com/owa/calendar/alasdairg...@heriotwatt.onmicrosoft.com/bookings/
>
> From: Nicola Vitucci <nicola.vitu...@gmail.com>
> Date: Monday, 24 January 2022 at 23:21
> To: users@jena.apache.org <users@jena.apache.org>
> Subject: Re: Trying to count the properties used for each class
> ****************************************************************
> Caution: This email originated from a sender outside Heriot-Watt
> University.
> Do not follow links or open attachments if you doubt the authenticity of
> the sender or the content.
> ****************************************************************
>
>
> 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 <b...@snee.com> ha
> scritto:
>
> > Using arq and the data at
> > http://www.snee.com/bobdc.blog/files/BeatlesMusicians.ttl, I’m trying to
> > write a query that will list the classes used in the data and the number
> > of distinct properties used by instances of that class. I’m having a
> > hard time and can’t even write a query that lists the number of
> > properties used for just one of the classes; the following just shows me
> > a series of ones.
> >
> >     SELECT (COUNT(DISTINCT ?p) AS ?pcount)
> >     WHERE {
> >        ?s a <http://learningsparql.com/ns/schema/Song> .
> >        ?s ?p ?o .
> >     }
> >     GROUP BY ?p
> >
> > Any suggestions?
> >
> > Thanks,
> >
> > Bob
> >
> >
> ________________________________
>
> Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With
> campuses and students across the entire globe we span the world, delivering
> innovation and educational excellence in business, engineering, design and
> the physical, social and life sciences. This email is generated from the
> Heriot-Watt University Group, which includes:
>
>   1.  Heriot-Watt University, a Scottish charity registered under number
> SC000278
>   2.  Heriot- Watt Services Limited (Oriam), Scotland's national
> performance centre for sport. Heriot-Watt Services Limited is a private
> limited company registered is Scotland with registered number SC271030 and
> registered office at Research & Enterprise Services Heriot-Watt University,
> Riccarton, Edinburgh, EH14 4AS.
>
> The contents (including any attachments) are confidential. If you are not
> the intended recipient of this e-mail, any disclosure, copying,
> distribution or use of its contents is strictly prohibited, and you should
> please notify the sender immediately and then delete it (including any
> attachments) from your system.
>

Reply via email to