﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19512	Aggregate or Annotaion on previously Annotated values	eye-see-you@…	nobody	"from django.db.models import Count, Sum, F

myModel.objects \
               .annotate(a_count=Count('field_a'), b_count=Count('field_b')) \
               .annotate(total=F('a_count')+F('b_count')) \
               .order_by('total')

This query is going to raise '''AttributeError: 'ExpressionNode' object has no attribute 'split''''

I don't find any method in django ORM to support such kind of operations (in which two fields are involved)."	Uncategorized	new	Database layer (models, ORM)	1.4	Normal		django, annotate, aggregate		Unreviewed	0	0	0	0	0	0
