i have a page that displays the last 5, 10 or 20 days of sales. the statement looks like this:
the resulting table looks like this when date_range = 5:Code:SELECT TOP "+date_range+" SalesDate, SUM(DailySales) AS total_sales FROM Sales GROUP BY SalesDate ORDER BY SalesDate DESC
the problem is that i also want to display the sum of each day's total_sales. any ideas??? i've tried including a subquery, but that doesn't allow me to sum up group calculations...tia!Code:SalesDate total_sales 06/25/2003 17 06/24/2003 25 06/23/2003 35 06/20/2003 11 06/19/2003 22



"There's no justice like angry mob justice!" --Seymour Skinner




Bookmarks