I have a table that tracks the lifecycle of documents. Because one document can have multiple things done to it, the "key" I'm using is repeated each time an action is taken on the document. What I'm trying to accomplish is to get a count of the different document types. The document should only be counted once if the "key" is a repeat. For example, my table looks like:
key date document
1 7/18/11 word document
1 7/18/11 word document
1 7/18/11 word document
2 7/18/11 word document
2 7/18/11 word document
3 7/18/11 Excel
3 7/18/11 Excel
In this example, the results I'm trying to obtain are:
Count document type
2 word document
1 Excel