On 19 Mar, 22:49, maxi wrote:
> Hi,
>
> Which is the better way to do this on orm language ?
>
> select filed1, sum(field2 * field3)
> from a_table
> group by field1
>
I believe this is not possible in the current Django ORM.
It would need something like this to work:
MyModel.objects.annotate
Hi,
Which is the better way to do this on orm language ?
select filed1, sum(field2 * field3)
from a_table
group by field1
Thanks in advance.
---
Maxi
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
2 matches
Mail list logo