﻿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
10929	Support a default value for Sum (and possibly other aggregation functions)	nolan	Nick Pope	"By default, annotate(sum_field = Sum(...)) results in sum_field being NULL if there were no values to sum.  In most cases, 0 would be a better option here, for proper sorting in a later order_by, and for comparisons using lt/gt/gte/lte.

A monkeypatch to implement default values for NULL using COALESCE is available here:
http://stackoverflow.com/questions/553038/treat-null-as-0-in-django-model"	New feature	closed	Database layer (models, ORM)	dev	Normal	fixed	aggregate annotate default	real.human@… net147 cvrebert jpk Simon Charette Hans Aarne Liblik	Ready for checkin	1	0	0	0	0	0
