如何将以下查询转换为doctrine2查询
with using method createQuery() or createQueryBuilder()
select customer,sum(marks) from BlogBundle:Customers group by customer
答案 0 :(得分:0)
$qb->select('customer', 'SUM(marks)')->from('BlogBundle:Customers', 'customer')->groupBy('customer.id');