title: Why does Django Queryset say: TypeError: Complex aggregates require an alias?
body: <p>I have a Django class as follows:</p>
  
  <pre><code>class MyModel(models.Model):
      my_int = models.IntegerField(null=True, blank=True,)
      created_ts = models.DateTimeField(default=datetime.utcnow, editable=False)
  </code></pre>
  
  <p>When I run the following queryset, I get an error:</p>
  
  <pre><code>&gt;&gt;&gt; from django.db.models import Max, F, Func
  &gt;&gt;&gt; MyModel.objects.all().aggregate(Max(Func(F('created_ts'), function='UNIX_TIMESTAMP')))
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "MyVirtualEnv/lib/python2.7/site-packages/django/db/models/query.py", line 297, in aggregate
      raise TypeError("Complex aggregates require an alias")
  TypeError: Complex aggregates require an alias
  </code></pre>
  
  <p>How do I adjust my queryset so that I don't get this error?
  I want to find the instance of MyModel with the latest created_ts. And I want to use the <code>UNIX_TIMESTAMP</code> function to get it.</p>