Can anyone please help what could be the equivalent to SQL's "percent_Rank" command in splunk
select host, count(*) "pings",
TRUNC(PERCENT_RANK(200) WITHIN GROUP (ORDER BY proc_time) * 100, 2) || '%' "PingTime (% < 50 mSec)" from servers GROUP BY host ORDER BY 2 DESC
| top limit=200 proc_time by host
| eval "PingTime (% < 50 mSec)"=round(percent,2)."%"
It is like this.
You should just be able to pipe your data to top and get what you need:
Or, if you mean percentiles, then you can use stats percX(Y) function for that:
I am not familiar with that command but perhaps some of the functions in the link below could help?