﻿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
16775	Support for simple arithmetic in ORM annotations	Dan Loewenherz	nobody	"I would like to use the Django ORM to run a query such as the following:

    SELECT SUM(amount * quantity) FROM orders;

Right now, I'm not sure this is possible. As for a potential API, I might suggest something like this:

    Order.objects.annotate(sum=Sum(F(""amount"") * F(""quantity"")))

Thoughts? Suggestions?"	New feature	closed	Database layer (models, ORM)	1.3	Normal	duplicate			Unreviewed	0	0	0	0	0	0
