Tuesday 6 August 2013

Django - Queryset Extra Replace Annotate

Individual case for Annotate Replacement without using Raw
- OrderedDict required to use with select_params
- Sum amount based on different data type
- Concatenate texts of grouped result.
Reference for GROUP_CONCAT: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat
Reference for Extra: https://docs.djangoproject.com/en/dev/ref/models/querysets/#extra

No comments :

Post a Comment