我需要知道如何在Doctrine 2中编写这个查询(我正在使用symfony2)
SELECT * FROM
(
SELECT m.id, m.reportName, m.createdAt, m.fileName, v.name
FROM Monitoring m
JOIN Venture v
ON m.venture_name = v.name
ORDER BY createdAt DESC
) AS r
GROUP BY r.reportName, r.name
ORDER BY createdAt DESC
我的实体是:“Venture”,“Monitory”