Total sum in mysql view
I have values for a table for each month of different years.
Entries:
entry_id
entry_date
entry_amount
Now I want a view that contains all the input values and the sum of the current year.
Entries_sum_view:
entry_id
entry_date
entry_amount
entry_cumulative_yearly_sum
where entry_cumulative_yearly_sum = SUM (all entries from January 01 of the year (entry_date) to entry_date)
Thanks Martin
+2
source to share