Find distinct x and corresponding y

rickygrimes picture rickygrimes · Apr 3, 2014 · Viewed 8k times · Source

I have a set of records with multiple duplicate values across two fields X, and Y. I would like to write a splunk query to find distinct X, and its corresponding Y value. I am completely lost, and have no clue on how to come up with this query. Can someone please help?

Answer

Syon picture Syon · Apr 3, 2014

What you're looking for is probably as simple as

| dedup X Y | table X Y

This will find all distinct combinations of X and Y and remove all duplicates, then display the result in a table.