Splunk® Cloud Services

SPL2 Search Manual

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Filtering data

When you aggregate data, sometimes you want to filter based on the results of the aggregate functions. Use the HAVING clause to filter after the aggregation, like this:

| FROM main GROUP BY host SELECT sum(bytes) AS sum, host HAVING sum > 1024*1024

This example only returns rows for hosts that have a sum of bytes that is greater than 1 megabyte (MB).

Next step

See More information on searching and SPL2.

Last modified on 21 April, 2020
PREVIOUS
Grouping search results
  NEXT
More information on searching and SPL2

This documentation applies to the following versions of Splunk® Cloud Services: current


Was this documentation topic helpful?


You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters