I am having a similar problem where I want to get the total (SUM)
of about 20 - 30 items in a current day. I can get the list of
customers names and payments in a html table but so far haven't
been able to get the SUM of those payments. I have tried using
Django ORM AGGREGATE SUM('integer field') but I am not able to get
the results.
I haven't tried grouping yet in my project but will probably have
to in the near future. I think it is possible to group by week
& month and then get a sum of those groups. MariaDB has a
function "MONTH" and " WEEKOFYEAR" which I hope will help with the
grouping. One problem that I have is that in my customer table I
have a ForeignKey link to a Payment_amount table so the user can
look up the payment amount instead of typing it in where an
extra/less zero could be entered.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a57a7058-ea08-4909-8e98-c678aa9969cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.