Not able to compare two loops in a chain query

I've already recommended in a different thread that you should look at this post for ideas:

Why do you keep on asking? I'm confused...