hello sir,
i want to find the sum of sales column from the table. Like today is 16-01-2014, i want the sum of sales column of 7 days back i.e. till 09-01-2014. I cannot put static dates as everyday date will change and every day i want that query to automatically see 7 days back records.
Please suggest.
Thanks
Rohit
Thanks Azim for sharing this query. It was helpful, i have modified it according to my question like: SELECT SUM(SALE) AS Total FROM Sales WHERE Saledate < GETDATE() AND Saledate <= DATEADD(d,-7, GETDATE())
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.