> is it possible to write a SPARQL query that given this data <snip> > returns only all subjects which belong only to class A? > So in my example, only "ex:1" should be returned. > Ah, and resources can have more than two classes. I haven't run this, but this might do the trick... SELECT ?x { ?x a ex:A . OPTIONAL { ?x a ?bar . } FILTER (!bound(?x) || sameTerm(?bar, ex:A)) } > 2) Is there any kind of collection on the web of common SPARQL > problems and > queries that solve it? Maybe some wiki page? Lee runs the SPARQL FAQ: http://thefigtrees.net/lee/sw/sparql-faqReceived on Friday, 1 February 2008 18:33:19 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 1 February 2008 18:33:19 GMT