title: Querystring for searching content in several paths, using SQL2
body: <p>Currently I am stuck at the issue to generate a query with multiple paths. I could accomplish the situation searching for childnodes from a specific <em>single</em> rootpath in the crx repository. I use the keyword <code>isdecendantnodenode()</code> for that:</p>
  
  <pre><code>select * from [nt:base] as p
  where
     (isdescendantnode (p, [first path])) 
     and contains(p.*, '"bankproducts"')
     and p.[sling:resourceType] = 'components/content/download'
  </code></pre>
  
  <p>As I said this works fine. Now I have to face the challenge searching for elements that does appear in <em>two or more</em> different childnodes - in the same hierarchy level.</p>
  
  <p>My attempts to achieve that are following:</p>
  
  <pre><code>select * from [nt:base] as p
  where
     (isdescendantnode (p, [first path]) and isdescendantnode(p, [second path]))
     and contains(p.*, '"bankproducts"')
     and p.[sling:resourceType] = 'components/content/download'
  </code></pre>
  
  <p>This gives me only the elements back they are only in the second path (in my eyes).</p>
  
  <p>The next example results into a repository exception:</p>
  
  <pre><code>select * from [nt:base] as p
  where
     (isdescendantnode (p, ([first path] and [second path]))
     and contains(p.*, ' "bankproducts"')
     and p.[sling:resourceType] = 'components/content/download'
  </code></pre>
  
  <p>May the order of keywords are wrong. I run out of ideas so SO belongs to the last options I've got.</p>
  
  <p>Thanks in advance</p>