title: Django annotate by sum of two values with multiple relations
body: <p>I have 4 models:</p>
  
  <pre><code>class App(models.Model):
     ...
  
  class AppVersion(models.Model):
     app = models.ForeignKey(App)
     version_code = models.IntegerField()
  
     class Meta:
          ordering = ('-version_code',)
     ...
  
  class Apk(models.Model):
     version = models.OneToOneField(AppVersion)
     size = models.IntegerField()
  
  class Obb(models.Model):
     version = models.ForeignKey(AppVersion)
     size = models.IntegerField()
  </code></pre>
  
  <p><code>AppVersion</code> version always has one <code>Apk</code>, but may have 0, 1 or 2 <code>Obb</code>'s</p>
  
  <p>I want to annotate QuerySet by total <code>size</code> of the <code>App</code> (which is <code>Apk.size</code> + sum of all <code>Obb.size</code> for given <code>AppVersion</code>).</p>
  
  <p>My <code>App</code> QuerySet looks like this:</p>
  
  <pre><code>qs = App.objects.filter(is_visible=True)
  </code></pre>
  
  <p>and versions subquery is:</p>
  
  <pre><code>latest_versions = Subquery(AppVersion.objects.filter(application=OuterRef(OuterRef('pk'))).values('pk')[:1])
  </code></pre>
  
  <p>This subquery always gives the latest <code>AppVersion</code> of the <code>App</code>.</p>
  
  <p>So what subquery should I use to annotate <code>qs</code> with <code>size</code> attribute calculated as shown above?</p>