I want to display the list of papers with more That a reporter , but I think I have a problem in my sql query syntax .. here is the whole function in my controller :
`public function nonattribuéAction()
{
$em=$this->getDoctrine()->getManager();
$repository = $em->getRepository('administrationadministrationBundle:Papier');
$repository = $em->getRepository('administrationadministrationBundle:CorrectionPap');
$query = $em->createQuery('SELECT * FROM administaration\administrationBundle\Entity\Papier WHERE pNum IN (SELECT DISTINCT pNum FROM administaration\administrationBundle\Entity\CorrectionPapier GROUP BY pNum HAVING COUNT(rNum)=>0)');
$papier = $query->getResult();
return $this->render('administrationadministrationBundle:Default:papier.html.twig', array('papier' => $papier, 'name' => 'Papiers Non Attribués'));
}`