Forum: Building VoltDB Applications

Post: Question regarding HAVING clause

Question regarding HAVING clause
Jan 13, 2014
My SQL statement contains a HAVING clause of the form:

HAVING aggregate_function(column_name) < groupby_column

However, the planner fails with the following error:

Error: "Unsupported expression node 'simplecolumn'

The planner is successful if I replace the groupby_column by a constant value. Does VoltDB not support groupby column in the HAVING clause? How can I fix it?
Jan 13, 2014
The inability to reference groupby columns in the HAVING clause is a known limitation in the current product.
You should be able to work around this by using MAX(groupby_column) in place of groupby_column.
Sorry for any inconvenience.