我有这个查询:
$em = $this->getDoctrine()->getEntityManager();
$query = $em->createQuery("SELECT u,COUNT(u) AS nb_renouvellement,
SUM(CASE WHEN f.`Criticity` = 'M' THEN 1 ELSE 0 END) nb_majeur,
SUM(CASE WHEN f.`Criticity` = 'C' THEN 1 ELSE 0 END) nb_critique
FROM AdminBlogBundle:AlertesBss2 f
GROUP BY f.BSC");
$listes = $query->getResult();
但我有这个错误
[语法错误] 第 0 行,第 45 列:错误:预期文字,得到 'CASE'