Query based on correlativity condition

Thanks, and i think i have to use a custom query, but can find the correct expression.

Found this but it doesn’t work.