BAQ runs much slower with filter

,

I am very glad this worked for you. I think that we have not promoted the use of CTE queries enough. I always thought that the CTE queries were only for creating recursive queries, but that is only a minor reason to use them.