#32277: Support nested aggregates in window expressions.
-------------------------------------+-------------------------------------
     Reporter:  Héctor Pablos        |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  window, aggregates   |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * cc: Mads Jensen (added)
 * status:  new => closed
 * type:  Bug => New feature
 * resolution:   => needsinfo


Comment:

 > ... where nesting two aggregates is a valid SQL expression

 I'm not sure about this, can you provide an example of useful window
 expression with nested aggregates. I've tried to remove this check for
 window expressions and it crashes on PostgreSQL:

 {{{
 django.db.utils.ProgrammingError: column "expressions_window_employee.id"
 must appear in the GROUP BY clause or be used in an aggregate function
 LINE 1: SELECT "expressions_window_employee"."id", "expressions_wind...
 }}}

 and Oracle:

 {{{
 django.db.utils.DatabaseError: ORA-00937: not a single-group group
 function
 }}}

 it works only on SQLite but the result is quite unexpected.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32277#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.213735cab172e57eab412754534dc400%40djangoproject.com.

Reply via email to