title: Using IN clause within FILTER clause, in SPARQL query
body: <p>I'm new to SPARQL. I'm trying to run this query --</p>
  
  <pre><code>PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
  PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
  PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
  SELECT * FROM &lt;http://purl.obolibrary.org/obo/merged/DOID&gt; WHERE {
      ?nodeID owl:annotatedSource &lt;http://purl.obolibrary.org/obo/DOID_11330&gt;.
      #?nodeID rdf:type owl:Annotation.
      ?nodeID owl:annotatedProperty ?annotatedProperty.
      ?nodeID owl:annotatedTarget ?annotatedTarget.
      ?nodeID ?aaProperty ?aaPropertyTarget.
      OPTIONAL {?annotatedProperty rdfs:label ?annotatedPropertyLabel}.
      OPTIONAL {?aaProperty rdfs:label ?aaPropertyLabel}.
      FILTER (isLiteral(?annotatedTarget)).   
      FILTER (not exists {?aaProperty in(owl:annotatedSource, rdf:type, owl:annotatedProperty, owl:annotatedTarget)
      })}
  </code></pre>
  
  <p>-- but I got this error and I don't know what to do. Please help me. Thanks.</p>
  
  <pre><code>Encountered " "in" "in "" at line 13, column 41.
  Was expecting one of:
      &lt;IRIref&gt; ...
      &lt;PNAME_NS&gt; ...
      &lt;PNAME_LN&gt; ...
      &lt;VAR1&gt; ...
      &lt;VAR2&gt; ...
      "a" ...
      "distinct" ...
      "multi" ...
      "shortest" ...
      "(" ...
      "!" ...
      "^" ...
  </code></pre>