I have a dataset with incident numbers and their associated Jurisdiction. It is possible that a incident will be listed in multiple jurisdictions.
I don't want to dedup(incident_number) globally.
I need to count by jurisdiction, but the dedup or distinct count needs to be within each Jurisdiction.
Use the by clause in stats command, e.g.
| stats count by jurisdiction
| stats dc(incident_number) by jurisdiction
View solution in original post