Opened 16 years ago

Last modified 12 years ago

#10972 closed

Use Expressions with Annotations — at Initial Version

Reported by: me@… Owned by:
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: expression aggregation aggregates annotation
Cc: samt@…, django@…, Alexander Koshelev, miracle2k, meticulos_slacker, bgrand, nwp, Dan Fairs Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

It would be nice if expressions could be used inside annotations, i.e. to perform something like the following:

Customer.objects.annotate('total_purchased': Sum(F('customerorderlineitemquantity') * F('customerorderlineitemprice')))

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top