Hi,

Did you manage to build the complete query?
I'm trying to write a similar one.