DQL Select every rows having one column's MAX value

后端 未结 3 1946
囚心锁ツ
囚心锁ツ 2021-01-03 05:28

Working with Symfony 2 and Doctrine, I\'m searching for a way to select every rows having the max value in a specific column.

Right now, I\'m doing it in two queries

3条回答
  •  天命终不由人
    2021-01-03 06:08

    For me when i trying to make a subquery i make:

    ->andWhere($qb->expr()->eq('affaire', $qb2->getDql()));
    

提交回复
热议问题