New thread for sub-query discussion created.
But in my case, the query is generated by other parties ... it needs special handling to add "AS X" to the end of query ...