added support for HAVING clause, ref #90