added documentation for having clause