Hello @sonuk85184451
One easy way to get SQL equivalent of a Querybuilder/Xpath is to use AEM logs.
Steps:
1. Refer to [0] to configure a new logger in debug mode.
2. Now, when you execute a query Querybuilder/Xpath query, its equivalent would be logged like
13.12.2022 09:51:13.715 *DEBUG* [[0:0:0:0:0:0:0:1] [1670905273708] GET /libs/cq/search/content/querydebug.html HTTP/1.1] org.apache.jackrabbit.oak.query.QueryImpl query execute select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [xxx/sling:resourceType] = 'xx/header' and isdescendantnode(a, '/content/en') /* xpath: /jcr:root/content/en//element(*, cq:PageContent)[(xxx/@sling:resourceType = 'xx/header')] */
The query statement has both sql and xpath equivalents.
In your case, the query part is only
type=cq:PageContent
path=/content/en
property=xxx/sling:resourceType
property.value=xx/header
While following filters are applied on top of query:
dateComparison.property1=cq:lastModified
dateComparison.property2=cq:lastReplicated
dateComparison.operation=greater
If you wish to use SQL, you might to do similar. Query and then filter.
[0]https://aemtreasury.wordpress.com/2015/11/13/how-to-enable-logging-of-aem-query/