It's easier to explain what I'm trying to do with an image, so let's go!
I need a query to get all parent items that have at least one Promotion Content as a child. The same for the contrary, I need to get all parent items that do not have promotion content as a child.
Here is how my query is currently.
/sitecore/content/Home/Articles//*[@@templatename = 'Article' and @__Never publish = '']
I have no idea how I can filter parent items based on their children's templates using Sitecore queries.
I know we can do this in many ways using PowerShell scripts but my intention here is to figure out whether it's possible to filter like this using only Sitecore queries.