Created
January 27, 2016 22:41
-
-
Save ABM-Dan/21976382d0b505ed9f4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$qb = $this->createQueryBuilder('l') | |
->leftJoin('l.sales', 's') | |
->where('l.is_active = 1') | |
->andWhere('s.sale_ts = (SELECT MAX(s2.sale_ts) FROM MyBundle:Sale s2 WHERE s2.location = l)') | |
->orderBy('l.id', 'ASC'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment