We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 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