0
SELECT ?Name FROM <http://.../biblio.rdf>
WHERE { ?Aut name ?Name . ?Pub author ?Aut . ?Pub conf ?Conf
FILTER (?Conf IN ( SELECT ?ConfX FROM <http://.../biblio.rdf>
WHERE { ?ConfX series "ISWC" }))}

I have taken the query from http://www.renzoangles.net/files/amw2011.pdf.

Getting the malformed query syntax error when I tried the above format in AWS Neptune.

Please help me fix the above query.

harish chava
  • 252
  • 2
  • 19
  • 1
    this paper just showed some suggestion how subqueries could be added to SPARQL 1.0 standard, but the one with the FILTER never made it to SPARQL 1.1 – UninformedUser Sep 23 '20 at 11:31
  • the obvious solution is to use a good old join: `SELECT ?Name FROM WHERE { ?Aut name ?Name . ?Pub author ?Aut . ?Pub conf ?Conf . ?Conf series "ISWC" }` – UninformedUser Sep 23 '20 at 11:32
  • that said, the predicates like `name`, `author`, etc. are indeed also invalid identifiers, given that the paper just showed pseudo syntax. You have to use a prefixed or full URI of those predicates – UninformedUser Sep 23 '20 at 11:34
  • last but not least, I doubt there is any guarantee that the `FROM ` will work - imagine, this loads an arbitrary file into the triple store, who wants to allow this? It can, but I'm sure many won't (out of the box) – UninformedUser Sep 23 '20 at 11:35
  • @UninformedUser I didn't use the exact query But tried other query with sub query in filter. Seems like this thing is not in 1.1 – harish chava Sep 23 '20 at 12:41

1 Answers1

0

If you want to test that a triple is in the data, which seems to be the intention of the exampel of "FILTER IN SELECT " here, yuo can use FILTER EXISTS

FILTER EXISTS { ?Conf series "ISWC" }
AndyS
  • 16,345
  • 17
  • 21