calculating grand total

G

Guest

Hello

I have a table which records the number of staff receiving
an education class, with a separate field for different
staff types.

I can create a query to sum each staff type.

How can I get a grand total across ALL staff types?

Thank you very much
 
J

John Spencer (MVP)

Drop the staff type from the query.

or use a report to sum the totals at the bottom.

Or use a union query, that might look something like the following

SELECT "Detail" as RecType, StaffType, Count(StaffType) as CountEm
FROM YourTable
GROUP BY StaffType
UNION ALL
SELECT "Total", "Grand Total", Count(StaffType)
FROM YourTable
GROUP BY "TOTAL"
ORDER BY 1, 2
 
Top