W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > August 2012

Re: Property Path usage query

From: Nicholas Humfrey <nicholas.humfrey@bbc.co.uk>
Date: Wed, 15 Aug 2012 11:26:42 +0100
To: Steve Harris <steve.harris@garlik.com>
CC: <public-rdf-dawg-comments@w3.org>
Message-ID: <CC5137F2.7D9EA%nicholas.humfrey@bbc.co.uk>
Thanks Steve. I confirm that this answers my query.

nick.


On 13/08/2012 11:43, "Steve Harris" <steve.harris@garlik.com> wrote:

> Not a formal response, but I think that would require aggregates, e.g.:
> 
> SELECT (MIN(?name) AS ?sname)
> WHERE {
>   <http://example.com/bob> foaf:knows ?person .
>   ?person foaf:name ?name .
> }
> GROUP BY ?person
> 
> If you use PPs then you could write foaf:knows/foaf:name, but then you can't
> express the grouping, as there's an implicit variable in the path expression.
> 
> - Steve
> 
> On 2012-08-13, at 11:37, Nicholas Humfrey wrote:
> 
>> Hello,
>> 
>> I have a question about what is possible using property paths:
>> 
>> Given this dataset:
>> <http://example.com/bob>    foaf:name  "Bob"  .
>> <http://example.com/joe>    foaf:name  "Joe"  .
>> <http://example.com/joe>    foaf:name  "Joe Bloggs"  .
>> <http://example.com/alice>  foaf:name  "Alice"  .
>> <http://example.com/bob>    foaf:knows  <http://example.com/joe>  .
>> <http://example.com/bob>    foaf:knows  <http://example.com/alice>  .
>> 
>> 
>> Is it possible to construct a Property Path query that returns a single name
>> for each of the people that Bob knows? ie "Joe", "Alice"
>> 
>> 
>> Thanks,
>> 
>> nick.


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					
Received on Wednesday, 15 August 2012 10:27:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 15 August 2012 10:27:26 GMT