Skip to content

Instantly share code, notes, and snippets.

@tyx
Created October 15, 2012 14:54
Show Gist options
  • Save tyx/3892909 to your computer and use it in GitHub Desktop.
Save tyx/3892909 to your computer and use it in GitHub Desktop.
->andWhere('s.id = (SELECT id FROM (SELECT id, MAX(shop.rating) FROM Atipik\BaseBundle\Entity\Shop shop WHERE shop.brand = s.brand) sub)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment