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:

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