- From: Gary King <gwking@metabang.com>
- Date: Sat, 28 Jul 2012 07:35:41 -0400
- To: reza ramezani <r.ramezani@ec.iut.ac.ir>
- Cc: public-sparql-dev@w3.org
Received on Saturday, 28 July 2012 11:36:07 UTC
Hi Reza, Something like (in pseudo-SPARQL since you haven't specified full URIs): select * { ?s a <country> . ?s ?p ?o } The first clause finds all of the subjects of type country; the second finds everything it can about those subjects. Hope this helps, On Jul 27, 2012, at 8:51 PM, reza ramezani <r.ramezani@ec.iut.ac.ir> wrote: > Hi Dear > I need a sparql which extract all triples related to an entity in a way that at least one of entities indicate that that entity is a country. > for example suppose we have these triples > > A rdf:type country > A Name Canada > A Size 10 > B Name Qom > B Size 20 > C rdf:type country > C size 10 > > As the result, the sparql must returns these results > > > A rdf:type country > A Name Canada > A Size 10 > C rdf:type country > C size 10 > > Because both A and B have rdf:type country > How can I write such sparql? > Many thanks -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter
Received on Saturday, 28 July 2012 11:36:07 UTC