Im guessing PHQL doesn't support subqueries like this. It's only supporting subqueries which will return only one column and only in select statements or where conditions. In from i guess it's not gonan work.
Uncaught exception 'Phalcon\Mvc\Model\Exception' with message 'Syntax error, unexpected token (, near to 'SELECT * FROM \Models\UserModel as u , \Models\NewsModel as n WHERE n.id = u.uid LIMIT 20) as tb '
As If I have a select statement that contain 2 tables , and i want to count the total rows , how can i do by phql?