I have a table with customers and a customertype. I would like to get a subtotal of the number of customer types. Here is an example. Note that the "Total" field is not in the database.
Type Total
Good 100
Bad 25
Other 9
Thank you
Here is what I have done so far... IT does give a total, but not a subtotal by Type.SELECT CustTypeFROM CustomerORDER BY CustTypeCOMPUTE COUNT(CustType)
from(
SELECT CustType
FROM Customer
ORDER BY CustType
COMPUTE COUNT(CustType)
) a
group by custtype