We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Union query

How can I execute an union query with PHQL or Query Builder?

I think you can not use PHQL or Query Builder, in this case, you should use Raw SQL

https://docs.phalcon.io/en/latest/reference/phql.html#using-raw-sql