D
Dan
Hi,
I am summarizing data like this
SELECT db
rder_Line_Invoice.Cono, db
rder_Line_Invoice.CustId,
Year([Invoicedate]) & '/' & Format(Month([Invoicedate]),'00') AS
[Year-Month], db
rder_Line_Invoice.VendId,
Sum(db
rder_Line_Invoice.Sales) AS Sales_Total, Sum([Sales]-[Cost]) AS
GM_Total, Count(db
rder_Line_Invoice.LineNum) AS Line_Count
FROM db
rder_Line_Invoice
WHERE (((db
rder_Line_Invoice.InvoiceDate)>=#8/1/2004# And
(db
rder_Line_Invoice.InvoiceDate)<=#7/31/2005#))
GROUP BY db
rder_Line_Invoice.Cono, db
rder_Line_Invoice.CustId,
Year([Invoicedate]) & '/' & Format(Month([Invoicedate]),'00'),
db
rder_Line_Invoice.VendId;
But I also want to count the number of orders. I am thinking I could
use a sub query to select just the orders for the above realtions, group
on ordernumber then Count(*) but I don't know how to actually do this.
Can someone help me?
TIA,
Dan
I am summarizing data like this
SELECT db
Year([Invoicedate]) & '/' & Format(Month([Invoicedate]),'00') AS
[Year-Month], db
Sum(db
GM_Total, Count(db
FROM db
WHERE (((db
(db
GROUP BY db
Year([Invoicedate]) & '/' & Format(Month([Invoicedate]),'00'),
db
But I also want to count the number of orders. I am thinking I could
use a sub query to select just the orders for the above realtions, group
on ordernumber then Count(*) but I don't know how to actually do this.
Can someone help me?
TIA,
Dan