title: Add operation on same valued record in Django
body: <p>I am trying to run query that sum of the same record that on the database. It is more clear to use codes instead of words.</p>
  
  <pre><code>class Track(models.Model):
      title = models.CharField()
      isrc = models.CharField()
      ...
  
  class Playlog(models.Model):
      track = models.ForeignKey(Track, on_delete=models.CASCADE)
      ....
  </code></pre>
  
  <p>On database there is multiple record which has same <code>isrc</code> value. To get real playlog data I needed to get total playlog count which has same isrc of all Track. I tried following query but it shows me a duplicated values of <code>Track</code>. if there is same <code>isrc</code> I wanted to get sum of all playlog of same <code>isrc</code> record.</p>
  
  <pre><code>Playlog.objects.values("track__isrc").annotate(Count("track__playlog", filter=Q(track__playlog__duration__gte=10)) 
  </code></pre>