Skip to main content


The WHERE clause allows filtering data. Likewise the HAVING clause helps filter aggregated data. That is, the filter conditions are applied after performing the GROUP BY operation.

In SQL Frames the HAVING operation can be performed using the gdf.having() API.

Performance considerations

In SQL Frames most clauses of the SELECT statement result in creating a separate DataFrame. However, the HAVING operation directly modifies the GROUPING clause and does not create a separate DataFrame. Since a Grouped DataFrame is backed by a Data Cube, aggregates don't need to be recalculated when the having clause changes. However, Analytic function fields do need to be recomputed after applying the having clause.