I have a template in AEM where I have to select all pages for the template where the component is present in pages.
Current query:
SELECT * FROM [cq:PageContent] AS page
WHERE ISDESCENDANTNODE(page, '/content')
AND [cq:template]="/conf/we-retail/settings/wcm/templates/experience-page"
This returns all pages but I have to return the selective pages. For example, currently, there are 2 text components present in the template, and one of the text components is unlocked and modified on page P1. Now that component is created on Page p1.
I have to return that P1 page in the result