report mothly sales

Mar 7, 2010 at 7:42 AM
Edited Mar 10, 2010 at 5:27 PM

Hi,

Herewith a basic montly sales report.
Replace 2010 and 01 with the year and month of the date you want to have a report.
Ofcourse you can expand the report with more fields.

SELECT A1.orderdate, A2.quantity, itemdesc
FROM nb_store_orders A1, nb_store_orderdetails A2
WHERE A1.OrderId = A2.OrderId
AND DATEPART(yyyy,A1.orderdate) = '2010' AND DATEPART(mm,A1.orderdate) = '01'
ORDER BY A2.ItemDesc ASC