Re: annotate() for subgroups within a column

2011-04-28 Thread Tom Evans
On Thu, Apr 21, 2011 at 9:22 PM, Ariana wrote: > Hi everyone, > > > > If it helps at all, this could be accomplished with the following SQL: > > SELECT updatee, score, id >   FROM Update >   WHERE lastUpdated = ( >       SELECT max(lastUpdated) >       FROM Update as u >       WHERE u.updatee

annotate() for subgroups within a column

2011-04-21 Thread Ariana
Hi everyone, I'm brand-new to Django so this may be a noob question; however, I've been stuck on this one query for a couple of days now and can't seem to reach a solution. I'm working with a model called Update, which represents an update to a user's score in a match. I am trying to return the mo