- From: Souripriya Das <souripriya.das@oracle.com>
- Date: Mon, 2 Oct 2023 03:23:06 +0000
- To: Thomas Lörtsch <tl@rat.io>
- CC: RDF-star Working Group <public-rdf-star-wg@w3.org>
- Message-ID: <SN4PR10MB5622D8B640C3621E9ECB8695FAC5A@SN4PR10MB5622.namprd10.prod.outlook.com>
Hi Thomas, The following query should return all the triples in named graph :kg that are :basedOn :webSearch. PREFIX : <tag:> SELECT ?s ?p ?o { graph :kg { ?s ?p ?o | ?n . ?n :basedOn :webSearch } } Thanks, Souri. ________________________________ From: Thomas Lörtsch <tl@rat.io> Sent: Saturday, September 30, 2023 6:39 AM To: Souripriya Das <souripriya.das@oracle.com> Cc: RDF-star Working Group <public-rdf-star-wg@w3.org> Subject: Querying for annotations in RDFn (was: Re: [External] : Re: A proposal for basing quotation and annotation upon blank graphs) Hi Souri, taking your example below, but with a different question: how does one, in RDFn, query for statements attributed in certain ways, e.g. how would one query for all statements that are :basedOn :webSearch given the example below? Best, Thomas > On 28. Sep 2023, at 17:15, Souripriya Das <SOURIPRIYA.DAS@oracle.com> wrote: > 1) Suppose that we have the following data to start with: > > @prefix : <tag:>. > graph :kg { :a :knows :b . :b :knows :c . :c :knows :d . } > > The following SPARQL query returns ?cnt = 3: > PREFIX : <tag:> > SELECT (count(*) as ?cnt) { graph :kg { ?x :knows ?y } } > > 2) Next, we want to say something about the set of triples consisting of the second and third triple above. In RDFn, if we extend its naming concept from naming just individual triples to allow naming of triple-sets as well, we can use the name :n for the target triple-set: > > @prefix : <tag:>. > graph :kg { :a :knows :b . > :b :knows :c | :n . > :c :knows :d | :n . > :n :basedOn :webSearch . > } > > Even with this changed data, the above SPARQL query would still return the correct result ?cnt = 3.
Received on Monday, 2 October 2023 03:23:26 UTC