Quick question about counting repeating values only once in a query.
I have a table with the following fields: ArtifactID, ArtifactType, Location. Multiple artifacts of the same or different type (e.g., stone wall), may be observed at any given location, meaning I have several records that have the same location and the same artifact type.
In my query, I want to generate (1) a total count of the artifacts by type AND (2) a total count of the locations at which a artifact type is observed. In other words, if 5 stone walls are observed at location A and 8 stone walls are observed at location B, I want a query that will spit out 13 (total number of stone walls observved) and 2 (total number of locations at which stone walls were observed).
I know I want to group by ArtifactType, but how do I count each location only once per artifact type? Here's my starting point:
SELECT tblHistSites.ArtifactType, Count(tblHistSites.ArtifactType) AS NumObs
GROUP BY tblHistSites.ArtifactType;