#30633: Group by concat(field1,field2) producing wrong result.
-------------------------------------+-------------------------------------
Reporter: bishwadeep | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: mysql group by | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* status: new => closed
* component: Uncategorized => Database layer (models, ORM)
* version: 2.2 => master
* resolution: => invalid
Comment:
I'm not sure what exactly you want to achieve because your expected query
and Django queryset are slightly different, but my understanding is that
`values()` is missing:
{{{
query.annotate(person=Concat('field1',
'field2')).values('person').annotate(Count('person', distinct=True))
}}}
Moreover this is a support question not a bug in Django, please use one of
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels].
--
Ticket URL: <https://code.djangoproject.com/ticket/30633#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 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/068.dd33ce9c23b38fd3fb1020ece54dc3dd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.