How to calculate last seven days Total

Database

How to calculate last seven days Total

Hi ,

I would like to show last seven days sum whatever date I select.

Thanks,

Rahul

1 REPLY
Senior Apprentice

Re: How to calculate last seven days Total

You need to add a WHERE-condition:

WHERE datecol BETWEEN CURRENT_DATE - 6 AND CURRENT_DATE