Let's say I'm doing a stats count by x,y
How would I formulate a WHERE that compares the string value of x and y and only returns the stats count when there's a difference.
So like stats count by x,y |where x != y
Put the where
clause before the stats
to reduce the number of events to process.
... | where 'x' != 'y' | stats count by x,y
The single quotes tell Splunk to treat x and y as field names rather than strings.
@summitsplunk Is your query not working. What are the values in x and y can you give an example.