Skip to content

Instantly share code, notes, and snippets.

@kuckmc01
Created June 3, 2019 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuckmc01/41c08343efe1dcfe7608cd940cb77deb to your computer and use it in GitHub Desktop.
Save kuckmc01/41c08343efe1dcfe7608cd940cb77deb to your computer and use it in GitHub Desktop.
triple join query
select page.* from [cq:Page] as page
inner join [cq:PageContent] as pageContent
on isChildNode(pageContent, page)
inner join [nt:base] as carousel
on isDescendantNode(carousel, pageContent)
inner join [nt:base] as list
on isDescendantNode(list, pageContent)
where isDescendantNode(pageContent, '/content')
and name(pageContent) = 'jcr:content'
and carousel.[sling:resourceType] = 'COMPONENT_ONE'
and list.[sling:resourceType] = 'COMPONENT_TWO'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment