#27632: Oracle backend fails to execute a query with an aggregation that 
contains
an expression in the GROUP BY.
-------------------------------------+-------------------------------------
     Reporter:  Josh Smeaton         |                    Owner:  felixxm
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  oracle               |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Josh Smeaton):

 Thinking about this more, this isn't always going to be correct. What if
 you want to GROUP BY the substring of a column? We'd be changing results.

 {{{
 Name, Siblings
 Josh, 3
 James, 3
 }}}

 {{{#!sql
 SELECT SUM(Siblings), SUBSTR(NAME, 1) FROM TABLE
 GROUP BY SUBSTR(NAME, '1')

 J, 6
 }}}

 {{{#!sql
 SELECT SUM(Siblings), SUBSTR(NAME, 1) FROM TABLE
 GROUP BY NAME

 J, 3
 J, 3
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27632#comment:4>
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/066.c54684361e9d3910dd3a415390ebda74%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to