title: Adobe CQ AEM: query to fetch pages by passing component name
body: <p>I am using Query builder as below to get the list of distinct pages which uses the component (component name will passed as a parameter) in property. I need to pass two parameters, <code>cq:lastReplicationAction=Activate</code> and <code>sling:resourceType=component</code> path. I tried above JSON query but no result and it is failing since the component may be used at any level of page node. E.g, <code>/jcr:content/par/component</code> or <code>/jcr:content/par/mainpar/component</code></p>
  
  <blockquote>
    <p><a href="https://host:port/bin/querybuilder.json?1_property=sling:resourceType&amp;1_property.value=COMPONENTPATH&amp;2_property=jcr:content/cq:lastReplicationAction&amp;2_property.value=Activate&amp;path=FROM_WHICH_CONTENT_PATH&amp;type=cq:Page&amp;p.limit=-1" rel="nofollow">https://host:port/bin/querybuilder.json?1_property=sling:resourceType&amp;1_property.value=COMPONENTPATH&amp;2_property=jcr:content/cq:lastReplicationAction&amp;2_property.value=Activate&amp;path=FROM_WHICH_CONTENT_PATH&amp;type=cq:Page&amp;p.limit=-1</a></p>
  </blockquote>