Doctrine Raw Query

$q = Doctrine_Manager::getInstance()->getCurrentConnection();

$result = $q->execute(

SELECT DISTINCT category_id
, GROUP_CONCAT(DISTINCT people_id) as people_id
, c.name as cname
, GROUP_CONCAT( DISTINCT p2.name) as pname
FROM pictures p
LEFT JOIN category c
ON p.category_id = c.id
LEFT JOIN people p2
ON p.people_id = p2.id
GROUP BY p.category_id
ORDER BY p.category_id asc

);