Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY `I`.`codigo` ORDER BY count(P.id_imovel) DESC, isnull(valor_venda) ASC,' at line 3' in /home/storage/0/55/db/marc/public_html/library/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /home/storage/0/55/db/marc/public_html/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /home/storage/0/55/db/marc/public_html/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #2 /home/storage/0/55/db/marc/public_html/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /home/storage/0/55/db/marc/public_html/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array) #4 /home/storage/0/55/db/marc/public_html/library/Zend/Db/Select.php(686): Zend_Db_Adapter_Pdo_Abstr in /home/storage/0/55/db/marc/public_html/library/Zend/Db/Statement/Pdo.php on line 235