I want to select previous 14 day’s Total Sales for Each day.
I have a table: Orders, where i have columns: Product Provider, Product Name, Date, Order Amount.
For example: for 08/16/2024 I wannna to select sum(Order Amount) beetwen 08/02/2024 and 08/15/2024,
for 08/14/2024 I wannna to select sum(Order Amount) beetwen 08/01/2024 and 08/14/2024.
Am i thinking right, that I need to use SelfJoin?
I used Selfjoin , but in connectionI did something wrong,
Alen Alaverdyan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1