今天我去选择明确的选择和我的学说Symfony 2返回了一个奇怪的错误......
"[Semantical Error] line 0, col 46 near '(select distinct': Error: Class '(' is not defined."
我的查询是:
$em2 = $this->getDoctrine()->getManager();
$q = $em2->createQuery("select count(num_linhas) as qnt_clientes from (select distinct p.cliente
from pedido as p, cliente as c, nivel_pontuacao as nv, pedido_item as pit
where p.id = pit.pedido
AND p.cliente = c.id
AND nv.id = c.nivel_pontuacao
AND p.vencimento >= CURRENT_DATE - tempo_medicao*INTERVAL '1' month group by p.empresa, p.id) as num_linhas");
$entities = $q->getResult();
任何人都可以帮助我吗?