I'm trying to create a query to show me all users who have purchased more than 1 type of product.
Each event has a "user" field and a "product" field. I only want to see the users that have purchased more than 1 type of product.
"| stats count by user product"
This shows me all user and product combinations, but don't know how to filter all events where a user only purchased one type of product.
I feel that it should be a very simple query, but can't seem to figure it out.
Hi @john_byun,
Please try below;
| stats dc(product) as count by user
| where count>1
Hi @john_byun,
Please try below;
| stats dc(product) as count by user
| where count>1
Perfect! Thanks for your help.