This query is for an Access 97 database and it works OK. With it I get a total cost for each department. Department is not the key field, there are 40 fields. There are 50 different departments in the Department field & 10,000 records.
SELECT [Department], COUNT([Department]) AS [SKU Count], SUM([Quantity]*[Cost]) AS [Department Cost] FROM [Products]
GROUP BY [Department]
The question is, how can I get the total cost of every item in every department included in this query? A grand total at the bottom of the [Department Cost] column, if possible.
SELECT [Department], COUNT([Department]) AS [SKU Count], SUM([Quantity]*[Cost]) AS [Department Cost] FROM [Products]
GROUP BY [Department]
The question is, how can I get the total cost of every item in every department included in this query? A grand total at the bottom of the [Department Cost] column, if possible.