Splunk Search

How to get the 10 min values of a column by another column?

alexandrerichar
Explorer

I am trying to do something like this:

| stats limit=10 min(Speed) by customer

or

| sort customer, speed
| head(10) by customer
0 Karma
1 Solution

alexandrerichar
Explorer

to4kawa, your solution seems to only one speed per customer, but what I want is the 10 lowest speed per customer. I have found that this solution si working well even if it is not beautiful :

| sort customer, Speed
| streamstats count as row by customer
| search row <= 5
| fields customer, Speed

View solution in original post

0 Karma

alexandrerichar
Explorer

to4kawa, your solution seems to only one speed per customer, but what I want is the 10 lowest speed per customer. I have found that this solution si working well even if it is not beautiful :

| sort customer, Speed
| streamstats count as row by customer
| search row <= 5
| fields customer, Speed
0 Karma

sensitive-thug
Splunk Employee
Splunk Employee

Hi @alexandrerichard,

Thanks for asking a question! If you were able to resolve this issue, please click “Accept” directly below the answer to resolve the post.

0 Karma

to4kawa
Ultra Champion

stats does not have limit and headdoes not have by .

see reference.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Rather than describe the problem in terms of SPL (which may not describe the problem at all), can you describe it in natural language?
What do you want the results to look like?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...