#30209: Union with group by don't generate correct Subquery
-------------------------------------+-------------------------------------
     Reporter:  Nikolas              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  union, group by      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Nikolas):

 Replying to [comment:2 Simon Charette]:
 > I agree that either an exception should be raised and the
 [https://docs.djangoproject.com/en/2.1/ref/models/querysets/#union
 documentation be adjusted] to explicitly mention aggregation won't work or
 adding an aggregate function should perform a subquery pushdown.


 Please can help, how can rewrite query for correct work???? My boss shut
 me in close time, but i stock there)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30209#comment:3>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.73617da104fae1b69eb9bc3fa75a5c3f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to