Am Dienstag, den 26.05.2009, 13:12 +0100 schrieb Axel Polleres: > When thinking about subqueries in FILTERs instead of just as > UNSAID/NOTEXISTS, I had rather thought about use cases where the > subquery appears in a complex filter expression... > > > E.g. let's say you look for persons who don't have an email address > (foaf:mbox) but an foaf:mbox_sha1sum or a foaf:homepage. > > > SELECT ?x > { ?x a foaf:Person > FILTER ( ! EXISTS{ ?x foaf:mbox [] } > && ( EXISTS{ ?x foaf:mbox [] } > || EXISTS{ ?x foaf:homepage [] } ) ) > } > > > How'd you write that with the non-filter version? How'd you write that > with the non-filter version? Probably here a version with UNION and > UNSAID instead would also not look much nicer. SELECT ?x { ?x a foaf:Person . UNSAID {?x foaf:mbox []} . { { ?x foaf:mbox_sha1sum } UNION { ?x foaf:homepage [] } } } Cheers, Simon -- Simon Schenk | ISWeb | Uni Koblenz http://isweb.uni-koblenz.de http://www.uni-koblenz.de/~sschenkReceived on Tuesday, 26 May 2009 12:54:44 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 1 October 2009 14:42:12 GMT