I have a table that has date and total number of orders. I need to return something that looks like this:
Date Total
5 12/2/08
10 12/1/08
585 Total for November
51 11/30/08
80 11/29/08
.....
Is this possible?
I can get this information in two queries:
Select dtDate, numOrders
from tblTotalOrders
order by dtDate desc
Select year(dtDate) as year, month(dtDate) as month, sum(numOrders)
group by year(dtDate), month(dtDate)
order by year,month desc
Any guidance you can provide would be most grateful.
Thanks in advance
Date Total
5 12/2/08
10 12/1/08
585 Total for November
51 11/30/08
80 11/29/08
.....
Is this possible?
I can get this information in two queries:
Select dtDate, numOrders
from tblTotalOrders
order by dtDate desc
Select year(dtDate) as year, month(dtDate) as month, sum(numOrders)
group by year(dtDate), month(dtDate)
order by year,month desc
Any guidance you can provide would be most grateful.
Thanks in advance